cvs commit: src/lib/libc/stdlib malloc.c

Mike Silbersack silby at silby.com
Sun Jan 15 01:34:44 PST 2006


On Sun, 15 Jan 2006, Jason Evans wrote:

> On amd64, jemalloc uses mmap() to get chunks of memory to carve up.  It's 
> possible that these chunks are above 4 GB, which means that the high bits are 
> important, but sizeof(int) is 4, not large enough to store such a pointer. 
> With sbrk(), the addresses are rather small, so the high bits would never be 
> used in that case.  This bug would slip by with most (all?) other allocators, 
> and would also slip by jemalloc if USE_BRK were defined for amd64 in 
> malloc.c.
>
> Jason

It's probably more work than you want to do, but it'd probably be really 
helpful if you could rig up a patch to make phkmalloc in 6.x have the 
feature that all allocations go above 4GB.  That way you could call for 
wide testing with that flag enabled, and the ports bugs of this type can 
be shaken out without people blaming jemalloc in -current.

Mike "Silby" Silbersack


More information about the cvs-all mailing list