syscall: Zero out memory that already exists during the brk system call.
authorTimothy M. Jones <tjones1@inf.ed.ac.uk>
Sat, 24 Oct 2009 17:53:58 +0000 (10:53 -0700)
committerTimothy M. Jones <tjones1@inf.ed.ac.uk>
Sat, 24 Oct 2009 17:53:58 +0000 (10:53 -0700)
commit03da1e53c24aa86a3b04216c3d2d002fd9020ea0
tree8b562fe53646a789df61bf514669a1b60bd08777
parentcc21f862e2d6ad6ba8d5332d6bbc05e58e55bfa0
syscall: Zero out memory that already exists during the brk system call.

Glibc often assumes that memory it receives from the kernel after a brk
system call will contain only zeros. This is important during a calloc,
because it won't clear the new memory itself. In the simulator, if the
new page exists, it will be cleared using this patch, to mimic the kernel's
functionality.
src/sim/syscall_emul.cc