[lkml]   [2000]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Overcommitable memory??
On Wed, Mar 15, 2000 at 10:36:21PM +0000, James Sutherland wrote:
> On 15 Mar 2000, Rask Ingemann Lambertsen wrote:

> >
> > Actually, we do. If malloc (262144) returns non-zero, then we've told
> > the application that we have 256 kB of memory, implemented as RAM or swap
> > in any combination the kernel sees fit, as long as there is 256 kB in total.
> No, we have GIVEN it 256K of RAM. We don't say "We've got 255Mb of RAM,
> how much would you like?", the app says "I need 17384Kb of RAM to operate.
> Can I have it please?". Either the kernel says "yes", and it works, or it
> says "no", and the app gives up.

That's only for simple apps.

> The problems occur when it decides it would like another chunk of RAM, and
> is told it can't have it - at which point (since it only asked because it
> NEEDED the RAM) it will almost always have to give up.


> We NEVER allocate memory via malloc() and then later discover we can't
> honour that allocation - once the memory has been allocated, it is the
> property of that process, to do with as it pleases.
You don't understand [cm]alloc(). You confusing malloc(), which allocates
space in the process (virtual) space, and calloc() which allocates space and
touches it. malloc() is very needed for the same reason sparce files are
You need to look at sparse table and weakly connected graph algorithms.

Carlos Morgado - chbm(at)chbm(dot)nu - -- gpgkey: 0x1FC57F0A FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
[.sig died]

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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