-
Notifications
You must be signed in to change notification settings - Fork 31
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
mmap: cannot map a file #1155
Comments
I have traced the issue to calling The whole call stack (in kernel) is as follow: if ((size == 0) || ((size & (SIZE_PAGE - 1)) != 0)) {
return NULL;
} The condition of |
One more note: according to our documentation, mmap():
which strongly implies that |
I cannot map a file into memory using
mmap()
. Below is the test code that presents the issue, and outputs on Phoenix-RTOS (ia32-generic-qemu) and on Ubuntu 22.04:Phoenix-RTOS ia32-generic outputs:
while Ubuntu 22.04 (with gcc 11.4.0) outputs:
Mapped first 16 bytes of 'filename.txt' successfully.
Issue was discovered during porting x264 (phoenix-rtos/phoenix-rtos-ports#84) which
mmaps
an input video file.The text was updated successfully, but these errors were encountered: