-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large memory-mapped files, POSIX, mmap64(). I/O stream interface ? #53
Comments
On the usage of
|
Yep. The stream interface could be implemented by using trivial stream buffers for read and write. I will try to write a simple test program for both mmap64 and stream interface. struct ism_buf: std::streambuf { ism_buf input(mio_map.data(), mio_map.size()); |
It looks like mio already supports large files. Attached You will find a test program that I made. I created 8GB file and then made mapping for it. I also made simple stream interface for writing and reading from mapped file. |
After doing some light research, I'm finding that the standard From the GNU C Library reference:
These definitions alone though imply that we mio should use explicit overloads of This also goes for functions like
|
Thanks for your input guys. Unfortunately, currently I'm unable to work on mio or any other open source project, but I'm not against adding the mentioned features. So if anyone wants to take a stab at this :) |
Does the mio support large memory-mapped files ?
https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html
I just browsed source code and found that is uses mmap() call instead of mmap64() for mapping in POSIX systems.
The other issue is using C++ I/O stream type interface to access data. Looks like mio does not provide this kind of access. Could it be possible to do this by developing some sort of std::streambuf like interface into memory-mapped data ? Could you provide some hints how to implement this.
The text was updated successfully, but these errors were encountered: