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.
In reply to Re^5: how to occupy 1G of memory
by BrowserUk
in thread how to occupy 1G of memory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |