
On Mon, Mar 9, 2009 at 6:34 AM, dhruva
Hi, I am looking for a memory mapped file based allocator that does not map the whole file into memory. The size may be huge and I would not want to map all the contents into process memory. Since my read and write access are sequential, I would like the mapping to happen on demand (based on access violation trying to read an unmapped region of memory). Is there something like that in Interprocess/Boost (since the implementation needs to work both on M$ and GNU/Linux)?
regards, dhruva
One solution (which I've used with files of gigabyte size) that you could consider is writing a class to encapsulate memory mapped files that exposes the file contents only through a custom iterator class. These could work together to map and unmap portions of the file as the iterator position crosses 'page' boundaries. This would give you something close to on-demand paging. Stuart Dootson