in reply to Re^2: Possibly silly perl memory allocation question, duplicating scalars
in thread Possibly silly perl memory allocation question, duplicating scalars

The <STDIN> is there purely to make the program stop and wait at that point while I 'Check' the memory consumption in the task manager. The void context simply means that whatever input is typed, it is simply discarded.

The memory figures you see are just what I typed at that point so as to record that information as a part of teh console log. They are the "Memory usage" and "VM size" figures from the Task Manager Processes tab.

The null byte I write could be any value. You just have to write something, after you do the seek, to cause the 'file' to be extended to that point. Just as would with a normal file.


Examine what is said, not who speaks.        The end of an era!
"But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen
"Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo         "Efficiency is intelligent laziness." -David Dunham
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
  • Comment on Re^3: Possibly silly perl memory allocation question, duplicating scalars
  • Download Code

Replies are listed 'Best First'.
Re^4: Possibly silly perl memory allocation question, duplicating scalars
by periapt (Hermit) on Dec 15, 2004 at 15:28 UTC
    OK, great. Thanks

    PJ
    use strict; use warnings; use diagnostics;