in reply to how to occupy 1G of memory
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to occupy 1G of memory
by Anonymous Monk on Jul 13, 2010 at 06:12 UTC | |
by BrowserUk (Patriarch) on Jul 13, 2010 at 08:50 UTC | |
by Anonymous Monk on Jul 13, 2010 at 09:16 UTC | |
by BrowserUk (Patriarch) on Jul 13, 2010 at 09:32 UTC | |
by Anonymous Monk on Jul 13, 2010 at 09:18 UTC | |
by Anonymous Monk on Jul 13, 2010 at 06:39 UTC |