Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 1997 21:41:35 +0100
From:      Poul-Henning Kamp <phk@critter.dk.tfs.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@FreeBSD.org, dg@root.com, swallace@ece.uci.edu
Subject:   Re: exec bug 
Message-ID:  <7862.854311295@critter.dk.tfs.com>
In-Reply-To: Your message of "Mon, 27 Jan 1997 05:34:36 %2B1100." <199701261834.FAA05327@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199701261834.FAA05327@godzilla.zeta.org.au>, Bruce Evans writes:

>No, I'm iterating 1000 times, so the malloc initialization time is in
>the noise (unless it is done every time).  Also, printf() probably calls
>malloc() so the malloc initization time is already paid for.  Here's a
>version with more knobs to twiddle.

Well, phkmalloc can be a bit undeterministic in this respect, if you want
to be almost sure you get a fair picture do this:

	for (i=4;i<12;i++)
		malloc(1<<i);

That way you know that you have one page of each size ready.

printf allocates an entire page and thus doesn't really initialize
the "sub-page" stuff in phkmalloc.

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@tfs.com           TRW Financial Systems, Inc.
Power and ignorance is a disgusting cocktail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7862.854311295>