-
Notifications
You must be signed in to change notification settings - Fork 470
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
Memory mapped file support #677
Conversation
} | ||
|
||
|
||
#ifdef WIN32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using _WIN32 (as in the rest of the file).
Thanks, Stefan. I've tried to address the issues you mentioned. |
@boxerab travis-ci is setup to test your branch on *nix system |
@malaterre thanks, yes there are errors. should be easy to fix when I have time |
*nix should now compile with latest changes. |
x64 builds (linux, windows vc14, macos) are failing under ci because of regressions:
x86 builds segfaults on many tests You can find all tests results on CDash in the Experimental section. |
@malaterre how do the cool kids deal with failed tests? How to find the error ? |
I would suggest having a local VM on your windows host. Eg: http://ruby-journal.com/debug-your-failed-test-in-travis-ci/ |
Thanks. Test fixed. |
Closing this pull request, as my Zero Copy PR includes these changes, plus more improvements. |
I've added support for memory mapped files, windows and unix..
This will be useful for large images that do not fit into memory, but where one wants to decode a tile.
Currently there is an artificial limit on file size in OpenJPEG, this may help to remove this limit.
Also, with these enhancements, there is potential for dramatic memory savings: for decode, instead
of allocating all of the code block buffers in advance, the block can store a virtual memory pointer from the mapping for all code block segments. Only when the code block is about to be decoded do we need to allocate contiguous memory for the block.
Also for decode, there is no need to keep a separate memory buffer in the stream, and copy into this buffer. The OS will handle buffering.