Aubrey Li <aubreylee@xxxxxxxxx> wrote:
> malloc() allocates size bytes and returns a pointer to the allocated memory.
> ****The memory is not cleared.****
But this is *not* malloc(). It's mmap(). Are you prepared to guarantee that
there are no applications out there that don't rely on anon mmap() giving
zeroed memory?
NO-MMU can't do this clearing. Performance is down.
The MMU-mode clearing is done for security reasons - there shouldn't be any
leakage between processes, and because the zero page can just be faulted in.
Personally, I'd prefer to maintain compatibility with MMU-mode whereverNot necessary IMHO.
possible, but I'm happy with overrides like the MAP_UNINITIALISED flag
suggested.