lkml.org 
[lkml]   [2000]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Avoiding OOM on overcommit...?
James Sutherland wrote:

> >BUT "when I use up the resources given to me" - If the resources
> >weren't available, why did the system give them to me?
>
> It didn't.

If he did a [mc]alloc to ALLOCate the the memory and got a non-null
return, it certainly said it did.

> >> >Who gets killed - your process or mine?
> >> Yours, because there aren't enough resources to run it.
> >
> >The system told me there were enough resources.
>
> You asked it if there was 128Mb of VM free; there was.

If I used [mc]alloc(), I wasn't asking about free resources. I was
asking for ALLOCation of memory.

> Half an hour later, you try to use 128Mb of VM and fail.

If a process can segfault trying to use memory it has succeeded in
allocating, then the system has made a ghastly error.

> There is a rather simpler explanation than the nasty kernel having
> lied to you...

The explanation is not the issue. The issue is having programs that
act correctly (check malloc() returns, don't follow null pointers,
etc.) fail in ways that are quite difficult for their programmers
to prevent.

For example, this implies one should not run a production database on
a multi-user Linux machine since it could crash in non-recoverable
ways.

-
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.048 / U:10.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site