On Wed, 20 Aug 2003 [EMAIL PROTECTED] wrote:

> > freed and available segment of memory that was used. My WAG is that if
> > you changed the order of the different ways of reading the whole file,
> > the first read will take longer than the others.
>
> Exactly.
> Anyway the time is the order of a few seconds, not minutes.
>

In fact a way to account for this effect is to pre-allocate the
chunk of memory before doing the first read, e.g.

$file_size=-s "Test2.txt";
undef $whole_file;
$whole_file.=chr(0) x 100 until ($file_size-=100) <= 0;
undef $whole_file;

It might even be interesting to calculate the elapsed time to complete
the memory allocation.

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to