Date: Thu, 3 Sep 1998 01:48:52 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: eivind@yes.no (Eivind Eklund) Cc: bde@zeta.org.au, current@FreeBSD.ORG Subject: Re: ELF binaries size Message-ID: <199809030148.SAA04854@usr07.primenet.com> In-Reply-To: <19980902171903.50388@follo.net> from "Eivind Eklund" at Sep 2, 98 05:19:03 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
Actually, no. This would require buggering the fault handler to know
about executables.
It's actually:
Case #1:
00000000|11111111|22222222 (Page numbers)
| |
TTTTTTDD| | ELF image
TTTTTT |DD | a.out image
| |
TTTTTT | DD| ELF in core
TTTTTT |DD | a.out in core
Case #2:
00000000|11111111|22222222 (Page numbers)
| |
TTTTTTTD|DDDDDDDD| ELF image
TTTTTTT |DDDDDDDD|D a.out image
| |
TTTTTTT | D|DDDDDDDD ELF in core
TTTTTTT |DDDDDDDD|D a.out in core
Case #3:
00000000|11111111|22222222 (Page numbers)
| |
TTTTTTDD|DD | ELF image
TTTTTT |DDDD | a.out image
| |
TTTTTT | DD|DD ELF in core
TTTTTT |DDDD | a.out in core
...in other words, ELF will waste an extra page in core approximately
50% of the time (excluding other section effects, which may exist).
Terry Lambert
terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
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?199809030148.SAA04854>
