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

feat(nodefs): mmap and msync #10669

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

petersalomonsen
Copy link
Contributor

add implementation of mmap and msync for NODEFS

tests/fs/test_mmap.c Show resolved Hide resolved
throw new FS.ErrnoError({{{ cDefine('ENODEV') }}});
}
var ptr = _malloc(length);
NODEFS.stream_ops.read(stream, buffer, ptr + offset , length, position);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space before one of the ,s

}
var ptr = _malloc(length);
NODEFS.stream_ops.read(stream, buffer, ptr + offset , length, position);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comparing to MEMFS, offset is not used there, but you add it here - is that a bug there, or here? If we aren't sure, an assertion that the offset is 0 might be good enough for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure actually, so I've added the assertion as you suggest.

add implementation of mmap and msync for NODEFS
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @petersalomonsen !

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.

2 participants