sbrk(2) broken

Andrey Chernov ache at
Fri Jan 4 04:21:57 PST 2008

On Wed, Jan 02, 2008 at 10:38:40PM -0800, Jason Evans wrote:
> Poul-Henning noticed today that xchat fails to start if malloc uses sbrk 
> internally.  

Malloc() itself knows about memory amount _really_ in use by a program and 
could check it don't go beyond the limits, but for this it needs run-time 
check via getrlimit() call for each malloc() call (a program can use 
setrlimit() by itself). Traking direct mmap()s and sbrk()s outside of 
malloc() is also needed.


More information about the freebsd-current mailing list