Re: Overcommitable memory??

From: Jesse Pollard (pollard@cats-chateau.net)
Date: Sun Mar 19 2000 - 17:23:51 EST


On Sun, 19 Mar 2000, Olaf Weber wrote:
>Jesse Pollard writes:
>> On Sat, 18 Mar 2000, Linda Walsh wrote:
>>> Matija Nalis wrote:
>
>>>> Say you have 800MB virtual RAM, and you simulation currently uses 500MB.
>>>> And now, it tries to fork(2). Do you allow it, or does fork fail with
>>>> -ENOMEM ?
>
>>> Had exactly this problem in SoftWindows on IRIX. [...] Solution
>>> was to convert to using 'sproc', where amount of process sharing
>>> can be user defined -- something like a heavy-weight thread. [...]
>
>> Does that include sharing the stack space? Doing so would seem to
>> allow for corrupting the parent process stack.
>
>IIRC the usual practice on IRIX is that the child gets a copy of the
>parent's stack. The sproc call on IRIX can be compared to clone on
>Linux. If you don't mind using linux-specific code, you can use a
>clone call with CLONE_VM set. This works provided the child doesn't
>attempt to return from the function that called clone.

But if the parent does return, and proceds to call another function, woudn't
that corrupt the stack frame of the child?
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@cats-chateau.net

Any opinions expressed are solely my own.

-
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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:27 EST