Here's a simple and efficient way:
#! perl -slw use strict; my $ramfile; open RAM, '>', \$ramfile; seek RAM, 1024**3 - 1, 0; print RAM chr(0); close RAM; printf "Check ram: "; <>; undef $ramfile; printf "Check ram: "; <>; __END__ c:\test>GbRamFile.pl Check ram: 1056792k Check ram: 6168k
In reply to Re: how to occupy 1G of memory
by BrowserUk
in thread how to occupy 1G of memory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |