Skip to content

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