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

Assert reserved pages during GC to check over-allocating caused by copying #1093

Open
qinsoon opened this issue Mar 20, 2024 · 0 comments
Open
Labels
A-heap Area: Heap (including Mmapper, VMMap) C-bug Category: Bug P-normal Priority: Normal.

Comments

@qinsoon
Copy link
Member

qinsoon commented Mar 20, 2024

Copy allocators can allocate without checking the heap size, and the copy allocation will only fail if the physical allocation fails. We simply rely on 'collection_reserve' to make sure we leave enough room for copying when a GC is triggered, and rely on the policies to copy no more than than what they claim to copy. If anything goes wrong, we may end up over allocating above the heap size.
It would be good if we put an assertion to make sure that we always stay below the heap size during copying.

Note that when calculating collection reserve, we do not take object size growth into consideration. So the copied objects are larger, we may see the heap size larger than specified size.

@qinsoon qinsoon added C-bug Category: Bug A-heap Area: Heap (including Mmapper, VMMap) labels Mar 20, 2024
@udesou udesou added the P-normal Priority: Normal. label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-heap Area: Heap (including Mmapper, VMMap) C-bug Category: Bug P-normal Priority: Normal.
Projects
None yet
Development

No branches or pull requests

2 participants