This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: How can I use M_MMAP_MAX?
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: "Bruce Korb" <bruce dot korb at gmail dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Wed, 9 Apr 2008 16:28:40 -0500
- Subject: Re: How can I use M_MMAP_MAX?
"Bruce Korb" <bruce.korb@gmail.com> wrote on 04/09/2008 04:14:04 PM:
> I really expected this to work:
>
> #include <malloc.h>
>
> typedef void (malloc_init_t) (void);
>
> static malloc_init_t malloc_init;
>
> malloc_init_t * __malloc_initialize_hook = malloc_init;
>
> static void
> malloc_init(void)
> {
> mallopt(M_MMAP_MAX, 0);
> }
>
> However, all the 132+892K mappings below are mmap-ed:
>
All of your malloc requests are larger then the M_MMAP_THRESHOLD! And all
such allocations are mmaped.
So change your M_MMAP_THRESHOLD!
Bruce you obviously have not read the available documentation! Please do
your homework and use the #glibc for any further questions.
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center