32 bit malloc on x86_64
Carlos O'Donell
carlos@systemhalted.org
Tue Jul 8 15:55:00 GMT 2008
On Tue, Jul 8, 2008 at 11:15 AM, Jeremy Sanders <jss@ast.cam.ac.uk> wrote:
> The program allocates memory and deallocates it as it runs, so there's no
> fixed size block of memory. My mmap code seems to work, but I just wanted to
> know whether there is a better solution, and why the mallopt command is now
> being ignored by linux/glibc.
Write a slab allocator.
The mallopt command interacts with the glibc arena allocator, and it
should work as advertised.
Have you tried using the environment variable e.g. MALLOC_MMAP_MAX_=0?
It may be that by the time you call malloc the arena has already been
initialized with mmap'd memory.
Cheers,
Carlos.
More information about the Libc-help
mailing list