This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 32 bit malloc on x86_64


On Tue, 8 Jul 2008, Carlos O'Donell wrote:

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?

Thanks for the suggestion. The program still allocates seemingly mmap-ed addresses with this environment variable set and fails.


Maybe I should file a bug with Fedora as it seems to change between kernels, but I can't see how a kernel bug should affect glibc's malloc.

Jeremy

--
Jeremy Sanders <jss@ast.cam.ac.uk>   http://www-xray.ast.cam.ac.uk/~jss/
X-Ray Group, Institute of Astronomy, University of Cambridge, UK.
Public Key Server PGP Key ID: E1AAE053


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]