You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mmaping provides a very fast way of accessing the arrays, but it is fundamentally unsafe without significant effort. Basically, if the underlying file is modified (truncated, say), attempts to access the corresponding pages will raise a SIGBUS.
The only way to deal with this seems to be setting a signal handler to catch this error to avoid the default abort.
Probably the only way to deal with this is to make non-mmaping the default, and to read in the arrays on demand using fread. Possibly it's best to get rid of mmap entirely here; if we don't, we need to clearly document this behaviour.
Let's remove MMAP entirely. The default should be to read arrays in one-by-one using fread and mallocing memory on demand. The other option can then be to read the entire array in at once.
Activity
jeromekelleher commentedon Jun 14, 2018
Let's remove MMAP entirely. The default should be to read arrays in one-by-one using fread and mallocing memory on demand. The other option can then be to read the entire array in at once.
MMAP isn't worth the complexity.
jeromekelleher commentedon Jun 16, 2018
Also note here, the
__unix__checks don't work on OSX.jeromekelleher commentedon Dec 7, 2018
Partially resolved in #57 where we get rid of mmap from the API and also the C implementation. We can fix the Python implementation later in #58.