Random-access container that does not fit in memory?
问题 I have an array of objects (say, images), which is too large to fit into memory (e.g. 40GB). But my code needs to be able to randomly access these objects at runtime. What is the best way to do this? From my code's point of view, it shouldn't matter, of course, if some of the data is on disk or temporarily stored in memory; it should have transparent access: container.getObject(1242)->process(); container.getObject(479431)->process(); But how should I implement this container? Should it just