External Memory
Let’s get back to our 50GB list of integers. To store such a list, we need to store the integers somewhere outside main memory since the list certainly won’t fit inside main memory. Typically, we’d do this in the filesystem, assuming that our filesystem is larger than 50GB.
More specifically, we’d create a file that stores all the integers. Given that such a file would itself be massive, we might also decide to break up the data into several smaller files.
In any case, though, this approach alone doesn’t fully solve our problem. This is because when we run code, the computer works directly with data in main memory, and doesn’t deal directly with data from the filesystem. We touched on this earlier in The Memory Hierarchy, but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access