Click here to Skip to main content
13,006,195 members (78,763 online)
Rate this:
Please Sign up or sign in to vote.
See more:
can I implement a mechanism like "windows file mapping" in which you can treat large files on disk as if they're already loaded while they're not?
Posted 31-Oct-11 9:03am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Do you mean memory mapped files? If so, see[^]

If you mean direct disk access, you can use CreateFile to do that. You may run into access restrictions on Vista/Windows 7 though.
Joseph Marzbany 31-Oct-11 15:08pm
yes I do. but that is a windows approach while I intend a "portable C++ approach".
Nishant Sivakumar 31-Oct-11 15:11pm
There is no portable approach to these things, since C++ is agnostic of the file system (mostly).
Espen Harlinn 31-Oct-11 15:30pm
5'ed, true as far as the os and standard c/c++ libraries are concerned
Nishant Sivakumar 31-Oct-11 15:31pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Have a look at the ACE C++ library[^]:[^]

ACE is efficient and exceptionally well tested :)

It's also available for most relevant operating systems and compilers ...

Best regards
Espen Harlinn
Nishant Sivakumar 31-Oct-11 15:32pm
Interesting link - had not heard of that before. Voted 5!
Espen Harlinn 31-Oct-11 16:18pm
Thank you, Nish - I've written a real-time data historian on top of ACE, and I've always been very happy with both the library and the community.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100