Testing branch proposal

Bruce Dubbs bdubbs at swbell.net
Wed Jul 7 16:29:59 PDT 2004


Ian Molton wrote:
> On Wed, 7 Jul 2004 18:40:35 +0100
> Matthew Burgess <matthew at linuxfromscratch.org> wrote:
> 
> 
>>Surely it can't be as
>>simple as thinking "Oh, you want bash?  Right, I have another bash
>>process right here. Hmmm, what stuff can we re-use that's already in
>>RAM?"- or is it?
> 
> 
> Yup.
> 
> Or rather, not that the linker is doing this but the fact that the read
> only pages of the executable are stored in RAM noly once (being read
> only, why copy them - the processes sharing them cant corrupt each
> other).
> 
> Dont forget the MMU in the machine maps the virtual address space of
> each process onto physical memory - and its perfectly valid to map pages
> from two processes to the same physical addresses.


There may be a slight bit of confusion here.  If you are running two 
different processes that use readline statically compiled into the code, 
say bash and ftp, there will be two copies in RAM.  However two copies 
of bash will indeed, as Ian says, use the same code pages in RAM.

   -- Bruce





More information about the lfs-dev mailing list