in reply to Re^4: how to occupy 1G of memory
in thread how to occupy 1G of memory
Hm. My anonymous secretary appears to have beaten me to it again, but
1k (1024) * 1k = 1M; 1M *1k = 1G.
The -1 seeks to a position just before the end of 1GB. The printchr(0); forces the allocation of the memory as a single large chunk that will be returned to the OS on release.
|
|---|