-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On Sunday 26 June 2005 14:32, Michael G Schwern wrote:
> On Sun, Jun 26, 2005 at 01:58:26PM +0200, Tels wrote:
> > (Including vars, because that gives us strict, vars, and warnings as
> > a baseline):
> strict costs 120K + 8K vm.  strict + Exporter is 236K + 140K vm.  Note
> that if we add the cost of strict alone with the cost of Exporter alone
> the numbers don't jive with loading both of them together.  It should
> cost 324K + 148K vm, but it actually costs nearly 100K less.  So
> checking the cost of loading a module by subtracting the cost of
> loading all its dependencies from the cost of loading the module might
> not be accurate.

I had an idea: It might be that loading a module allocates some memory and 
then frees it again, but doesn't return it to the OS. So if you do:

        use A;

briefly uses 200 Kb, but frees 100. Then you do:

        use A;
        use B;

(both show 200 Kbyte process growth when loaded independently). But since 
loading A free 100 Kbyte, B only needs 100 more and the final process 
size is a bit smaller. AFAIK, ps and top don't show how much memory Perl 
is actually using from the size it claimed.

Best wishes,

Tels

- -- 
 Signed on Sun Jun 26 19:59:50 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 I'm a Wei-wei-wei-wei-wei-wow-wow-wow-wow-wow-wow-wizzzaahrd...

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQr7tmncLPEOTuEwVAQGlWwf+J0Mo+dX1K7oTmDuYQbFzBR0QZtKREvJ6
qNImwBOkboy/Fnp1PXbjLc8DQGapQ7IXjgPt9xZFH3Veq+XMAgF8+3ve5qLZKYUQ
+J5GTcFixpQmCjnBoQeVLNO4RWfnVN75D4XhybtBvWxNeIWQEG5qjM9Bp+L9nlU1
VNhj3V0VkSFZ+U41t2eQRoeDRhBLZf1iJUg55Zz/NIXhjggQq0ZlmtDgYH5ElPSz
QIULbFfwLrFU5SKu0pjow91tfxxQYZPf5Ea0sQq4zlkk0eTrsRGvmyNUSgWqMwsd
j+Rge1Vq+d4v/6buMWah7+pU8vXsWp3H1x0BgTpt0gk0bzUpa6HV1w==
=cnKU
-----END PGP SIGNATURE-----

Reply via email to