lkml.org 
[lkml]   [2000]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Virtual vs. physical swap & shared memory forks (clone)
Linda Walsh writes:
> Richard Gooch wrote:
> >
> > Linda Walsh writes:
> > > > Removing overcommit might make malloc() return null, but that's only one
> > > > of a host of ways to allocate memory. The other methods don't have a
> > > > return value. So arguing that "overcommit is bad, because it breaks the
> > > > malloc() return value" is pointless.
> > >
> > > What other methods? calloc - ENOMEM, open <object>, ENOMEM, fork:
> > > ENOMEM. Etc. All what you would expect if there was NOMEM.
> >
> > Stack "allocation". No error code available.
> >
> Except via "SIGSTKFLT" (16) - Sig Stack Fault if 'caught' --
> likely resulting in a suspend of the process? Is state saved on
> kernel or on user stack? Seems like it couldn't be on the user
> stack, otherwise, how could you deliver it?

My man page says "Stack fault on coprocessor". Hm. What co-processor?
Oh! My 387! At the least, exactly what SIGSTKFLT is delivered for
should be properly and clearly documented.

State is first saved on the kernel stack. If you want to catch a
signal, you need space in the user-space stack. Boom!

So, in low-memory situations, a growing stack can only result in a
signal that either suspends or kills the process. I don't call that
"deterministic" either. You may as well be buggered by the OOM killer.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca


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