This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fork() idea



===
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>


> On Sun, Jan 27, 2002 at 11:28:48PM +1100, Robert Collins wrote:
> >Just running this past for criticism.
> >
> >What if on fork(), we loaded a _trivial_  stub program, what depends
on
> >little-or-nothing, and thus takes up almost no memory, has little
chance
> >of dll conflicts, address relocation etc. Then allocate memory to
look
> >like the parent, load .dll's etc.
>
> I've toyed with this from time to time but I don't think it is a win.
> When you do a fork with the current implementation all of the text
> section will be read from memory and all of the data section will be
> copied from disk.

Ok, can the text section be done via COW?

> If you just start a stub, then you have to get the text section from
> somewhere.  AFAIK, you can't remap the memory from one process to
> another so you actually have to read from disk.  You could map it in
but
> I don't think that is guaranteed to be read directly from memory.

I'm suggesting that the text section and data section are read into a
named shared memory segment, thus allowing them to be mapped straight in
(and as the parents text section is in the same mapped area, it will
come from memory (as the parent is in memory :]).

Rob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]