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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy