Messages in this thread | | | Subject | Re: Overcommitable memory?? | From | Olaf Weber <> | Date | 19 Mar 2000 20:42:42 +0100 |
| |
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.
-- Olaf Weber
Do not meddle in the affairs of sysadmins, for they are quick to anger and have no need for subtlety.
- 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/
| |