lkml.org 
[lkml]   [1998]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Out Of Memory in v. 2.1
Date
> There's a perfectly good solution.  A little revolutionary.  Something like
> this... when RAM + SWAP is all allocated, and when a program goes to allocate
> more, then malloc() et al could actually return a null pointer.

Its not an application level problem

> I can't do anyhting about it". Yet, the memory allocation scheme in Linux is
> so poorly designed, that any user can lock up a machine, and there is nothing
> you can do about it. No one is jumping to fix that problem, so why bother

Thats resource limits. Deadlock problems are much more fundamental system
issues. User pages can be kicked out to disk or programs killed, kernel
needs for pages must in some cases be satisfied or else.

The two are very different things.

> there would be no problem. What's the deal with overallocating anyways...
> did someone figure that most programs allocate memory that they're never
> going to use?

Almost all do so by large amounts

> So, for a solution, let's do what all programs know how to deal with. Return
> nulls instead of overallocating. No processes need to get killed, and the
> system won't get deadlocked by overallocation.

And to boot a machine with 512Mb of RAM you'll need at least 600Mb or
so of swap file.


-
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:44    [W:0.111 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site