You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was useful when there was only a single size pool to have an easy
way of referencing the average number of objects a page could hold (this
would vary by a few in real terms because of page alignment).
But with multiple heaps, each heap contains pages with different numbers
of objects because slot sizes are different.
So when we use HEAP_PAGE_OBJ_LIMIT to do any kind of calculations: such
as calculating freeable pages), then we're significantly underestimating
the number of freeable pages in the larger size pools, which will cause
us to hold on to pages unnecessarily.
This commit replaces uses of HEAP_PAGE_OBJ_LIMIT with a more accurate
approximation for the actual heap being manipulated.
It also removes HEAP_PAGE_OBJ_LIMIT from GC::INTERNAL_CONSTANTS
0 commit comments