lkml.org 
[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Some questions about linux kernel.
On Tue, 21 Mar 2000, Matthew Kirkwood wrote:

> On Tue, 21 Mar 2000, Richard B. Johnson wrote:
>
> > > > Malloc(), as stated before, just sets a new break address when it
> > > > runs out of heap. It keeps track of the heap, but not very carefully.
> > >
> > > Not any more. Modern mallocs are a lot smarter. They also use mmap for
> > > their backing store
> >
> > Certainly not the C runtime library distributed by RedHat.
>
> > malloc(0x1000);
>
> glibc's malloc() will use mmap() only to allocate large lumps.
> (Currently the default is 128Kb or larger, I think.)
>
Correct. Many, in fact what looks like all, page-size chunks are
allocated using break. Try it and see. The 'set-break' goes on
forever.....


Cheers,
Dick Johnson

Penguin : Linux version 2.3.41 on an i686 machine (800.63 BogoMips).


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.488 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site