cvs commit: src/lib/libc/stdlib malloc.c
Jason Evans
jasone at FreeBSD.org
Thu Feb 22 19:10:31 UTC 2007
jasone 2007-02-22 19:10:30 UTC
FreeBSD src repository
Modified files:
lib/libc/stdlib malloc.c
Log:
Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory.
This has no impact unless USE_BRK is defined (32-bit platforms), in
which case user allocations are allocated via mmap() if at all possible,
in order to avoid the possibility of unreclaimable chunks in the data
segment.
Fix an obscure bug in base_alloc() that could have allowed undefined
behavior if an application were to use sbrk() in conjunction with a
USE_BRK-enabled malloc.
Revision Changes Path
1.140 +40 -36 src/lib/libc/stdlib/malloc.c
More information about the cvs-src
mailing list