lkml.org 
[lkml]   [2016]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[RFC] mm: why we should clear page when do anonymous page fault
handle_pte_fault()
do_anonymous_page()
alloc_zeroed_user_highpage_movable()

We will alloc a zeroed page when do anonymous page fault, I don't know
why should clear it? just for safe?

If user space program do like the following, there are two memset 0, right?
kernel alloc zeroed page, and user memset 0 it again, this will waste a
lot of time.

main()
{
...
vaddr = malloc(size)
if (vaddr)
memset(vaddr, 0, size);
...
}


Thanks,
Xishi Qiu

\
 
 \ /
  Last update: 2016-02-22 04:21    [W:0.084 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site