Skip to content
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

Mapping of size or offsets larger than 2GB on a 64 bit system #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattgol
Copy link

@mattgol mattgol commented Feb 7, 2020

As the parameters for map read from JavaScript where explicitely set to
int only 2GB could be used for either size or offset even on a 64bit system.
The type off_t automatically maps to a int32_t on 32 bit systems and
int64_t on 64 bit. The original size_t maps to unsigned which
would have been more appropriate but NAN does not contain an
unsigned type for 64bit.

As the parameters for map read from JavaScript where explicitely set to
int only 2GB could be used for either size or offset even on a 64bit system.
The type off_t automatically maps to a int32_t on 32 bit systems and
int64_t on 64 bit. The original size_t maps to unsigned which
would have been more appropriate but NAN does not contain an
unsigned type for 64bit.
@Widdershin
Copy link

@mattgol if you want to make this PR against https://github.com/Widdershin/mmap-io I'd be willing to include it.

@mattgol
Copy link
Author

mattgol commented Oct 23, 2020

@Widdershin Thanks for taking over maintenance. I'll post the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants