Hi everyone,

I am looking for information about how the glibc handle dynamic memory
allocation.
I've done some bechmark, using a small program and it apprears that
more than 70% on the time is spend in the kernel, inside do_page_fault
more precisely. My program does a lot of memory allocation,but does
not run at the same speed on all linux distro. I am kind of wondering
if this can be cause by a different version of the libc.
Basicaly calling malloc will end to calling mmap or brk depending of
some mysterious and changing rules.
I've done some kernel probing and it seems that malloc does call mmap
very often, causing a lot of page fault.
I do not know if there is a direct relation between calling mmap and
ending with a do_page_fault inside the kernel.
Using mallopt I've manage to reduce the number of mmap, but this does
not seems to be portable across linux distro (redhat, fedora, suse).
Is there an appropriate way to control this to avoid wasting time
calling mmap

Any comments will be greatly appreciate.

Regards

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to