-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
Change to dynamic memory allocation/commit on windows #1647
Conversation
This commit changes how the Windows memory allocation/commitment is done by switching from committing all memory immediately to only committing memory dynamically as it gets allocated. This resolves the Windows errors that PR ponylang#1614 and PR ponylang#1629 have been encountering related to `ponyint_virt_alloc` and `The paging file is too small for this operation to complete.`
Thanks! I'd like to wait until I've resolved my concerns with #1621 before merging this. I think I've found an issue in the implementation of |
97b1943
to
21d37aa
Compare
@dipinhora I've opened #1677 to fix the bug I found. This should also fix the errors resolved by this PR. Should this PR also be merged? |
@Praetonus I think so, but I leave that decision to you and others. The main benefit of this change is dynamic memory commitment as memory is used as opposed to committing the entire memory block immediately at the time of the The following comment from https://msdn.microsoft.com/en-us/library/windows/desktop/aa366803(v=vs.85).aspx explains a little more about it:
|
I'm going to mark the subject for discussion during sync. My biggest concern here is the kernel mode transition performed when calling |
I was thinking, maybe we could reduce the amount of memory we allocate in each |
@Praetonus That makes sense and is likely the better approach. Let me know whenever you make your final decision and I'll close this PR if you decide to go another way. |
We'll try to discuss it at the next sync meeting. We didn't have time this week. |
I ran into memory problems again for #1726. I'll open a first PR with the change to the amount of memory allocated from the OS, so that we can discuss your PR and mine during the sync meeting today. I've also noticed that we end up with a lot of small blocks in the global block list. We probably need to do coalescing, I'll open another PR for that. |
We discussed the two PRs during sync today. The general sentiment was that the system calls implied by I'm going to close this PR, thanks for raising the initial concern. |
Sounds good. Thanks. |
/cc @Praetonus
This PR implements suggestion 2 from #1614 (comment) to switch to using dynamic memory allocation/commitment for Windows.
This commit changes how the Windows memory allocation/commitment
is done by switching from committing all memory immediately
to only committing memory dynamically as it gets allocated.
This resolves the Windows errors that PR #1614 and PR #1629 have
been encountering related to
ponyint_virt_alloc
andThe paging file is too small for this operation to complete.