Demo: Allocate 10 TB¶
Ten thousand mmap() calls of a gigabyte each, on a machine with 64 GB.
Run¶
Two terminals. First:
Second, at each prompt:
Ask¶
VSZwent from 2.7 MB to 10 TiB. What didRSSdo?- The loop took a fraction of a second. What did the kernel not do, for it to be that fast?
- Ten thousand calls, and
pmapshows one new line. Why? - Try
./allocate_gb 140000. Where does it stop, and why there?