Boost Users :
Subject: Re: [Boost-users] [interprocess] Memory mapped file based allocator
From: dhruva (dhruva_at_[hidden])
Date: 2009-03-10 23:41:39
----- Original Message ----
> From: Stuart Dootson <stuart.dootson_at_[hidden]>
> > 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
> 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.
Thank you for the suggestion. I have implemented it on windows using SEH (structured exception handling). Is there something similar in the UNIX world. Adding a signal handler will be for the whole process, I need to check if there is a way to add a signal handler for a specific thread that is doing the read/write and perform the unmap and map sequence to keep moving the read/write window. This would be a great feature to have it tucked somewhere in BOOST. Reading/writing large files is quite common. If I succeed in putting in a solution that works on M$ and NIX world, I will post it.
Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net