Ulrich Drepper wrote:
On 6/26/07, Rik van Riel <[email protected]> wrote:
Since programs can get back free()d memory after a malloc(),
with the old contents of the memory intact, surely your
MAP_NONZERO behavior could be the default for programs that
can get away with it?
Maybe we could use some magic ELF header, similar to the
way non-executable stack is handled?
No. This is an implementation detail of the libc version. The malloc
as compiled today is expecting brk-ed memory to be zeroed. This
default can of course be changed (it's a simple define) but you cannot
make this the default behavior for brk.
After going through the first malloc()/free() cycle, surely
the memory will no longer be zeroed on the second malloc() ?
What makes the first brk malloc so special?
--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]