This is the mail archive of the libc-alpha@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: 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



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