Re: [PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Friday, March 30, 2007 - 7:56 am

> I can't find mmap must give zeroed memory in the mmap manual.

Its how all Unix/Linux like systems behave. You have to clear the memory
to something to deal with security on any kind of real system, and zero
is a good a value as any


mmap() for anonymous memory pools should not normally be a hot path,
because the C library malloc is supposed to show some brains. If you need
special behaviour (eg for performance hacks) then create yourself
a /dev/zero like device which just maps uncleared pages. Its not much
code and it keeps special cases out of the core kernel.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] nommu arch dont zero the anonymous mapping by ..., Alan Cox, (Fri Mar 30, 7:56 am)