From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199801230007.QAA09141@fock.usc.edu> Date: Fri, 23 Jan 1998 15:09:13 -0500 (EST) From: Aleksandr Pilosov Subject: Re: strace/mmap/munmap/mremap wierdness In-Reply-To: <19980123025057.26497@dot.cygnus.com> On Fri, 23 Jan 1998, Richard Henderson wrote: > On Fri, Jan 23, 1998 at 01:51:27AM -0500, Aleksandr Pilosov wrote: > > While stracing my application, I noticed that it generates an unusual > > number of mmap/munmap syscalls (a lot). This doesn't happen on i386 > > machine (with rh4.1 and linux libc). I wonder if glibc implements malloc > > in terms of mmap? > > "Large" allocations are handled with mmap, to prevent the nastiest > bit of fragmentation that can happen. Don't recall what the specific > numbers are for cutoffs... Well, my mmap calls have size of 8k, I doubt that is a large chunk of memory. Maybe it thinks that if you malloc/free exactly 8k (1 page worth) of memory, its easier to use mmap (which is probably a good assumption)? Is using mmap faster than brk() and managing the space yourself? *goes to grab glibc source and read the malloc code* -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com