Date: Wed, 2 Sep 1998 17:19:03 +0200 From: Eivind Eklund <eivind@yes.no> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG Subject: Re: ELF binaries size Message-ID: <19980902171903.50388@follo.net> In-Reply-To: <199809021348.XAA08775@godzilla.zeta.org.au>; from Bruce Evans on Wed, Sep 02, 1998 at 11:48:09PM %2B1000 References: <199809021348.XAA08775@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 02, 1998 at 11:48:09PM +1000, Bruce Evans wrote: > >> Nah. The dual mapping is precisely what costs a full page of real memory. > > > >Does this mean we have two copies instead of two mappings? If we had > > Yes, there are 2 copies after the first data page is written to. The data > page becomes disassociated from the file. This is normal for copy-on- > write pages. Ah, got it. Stupid me. In case there are anybody left that didn't think hard enough: 00000000|11111111|22222222 (Page numbers) | | TTTTTTT |DDDDDDD | Under a.out non-overflow - always 2 pages | | V| | Under ELF - 2 pages unless marked spot is TTTTTTTD|DDDDDD | written, then 3 pages - 1 page wasted. | | TTTTTTT |DDDDDDDD|D Under a.out overflow - 3 pages | | V| | TTTTTTTD|DDDDDDDD| Under ELF - 2 pages unless marked spot is | | written, then 3 pages. Gives 1 wasted page in 50% of the cases iff the section that is shared with the text gets written. Does anybody have any statistics on how often COW is invoked on the "overlapping" segments? Each time COW is not invoked in the a.out overflow case will give ELF one won page compared to a.out (to offset the losses for the non-overflow case...) Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980902171903.50388>