[lia64-kernel] Re: Re: Re: Re: Re: clone and clone2

Ulrich Drepper drepper@redhat.com
Tue Jun 20 17:48:00 GMT 2000


David Mosberger <davidm@hpl.hp.com> writes:

> But if we do that, clone() couldn't be used to specify a fixed size
> stack area that lives in memory that has already been allocated (e.g.,
> as part of a larger structure).
> 
> Seems like a case of damned if you do, damned if you don't...

Simply provide a clone flag.  If not set, clone assumes the memory is
there.  If it is set. clone actually reserves the memory and sets the
stack pointer at the appropriate end.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list