-
Notifications
You must be signed in to change notification settings - Fork 843
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 fails at size 8GB #597
Comments
Thanks for reporting this. By default native Linux will not allowing you to map an address range larger than your swap file size. In WSL we report the size of the swap file as the size of the NT page file (check the output of top or htop to see how big your swap file is). You should be able to get around this by increasing your NT page file size. On native Linux this behavior is configurable by setting /proc/sys/vm/overcommit_memory to 1, but that ProcFs file is not currently exposed in WSL. |
@benhillis Thanks for your explanation! Out of curiosity I did some more experiments. Does following result look normal? Native Ubuntu (running in hyper-V VM) succeeds up to 64TB. Doesn't look like 50 x anything? On WSL, max mmap size for above test --
On Native Ubuntu, max mmap size for above test --
|
Native Ubuntu might do something strange with PROT_NONE. Could you change that to |
@benhillis Yes, you are right -- With "PROT_READ | PROT_WRITE" Native Ubuntu can only do |
Support for this has vastly improved in Creators Update. |
Latest insider (updated today) this issue appears again. |
@obastemur - What is your output of ver.exe? There was an additional fix that did not make creators update but reached Windows Insiders in build 16215. |
Tried on my box and the maximum successful size was 4GB.
mmap
returns-1
at 8GB.The text was updated successfully, but these errors were encountered: