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
Make GC triggering and heap resizing consistent (mmtk#1266)
This PR fixes a bug where the MemBalancer did not increase the heap size
enough to accommodate the amount of side metadata needed by the pending
allocation. It manifested as looping infinitely between triggering GC
and (not actually) resizing the heap size after a GC when the minimum
heap size is too small.
Now it always includes the side metadata amount when increasing heap
size.
This PR also refactors the calculation of "shifting right and rounding
up" which is used in multiple places. We also replace `alloc_rshift`
with `log_data_meta_ratio` for two reasons. (1) The previous
implementation would cause unsigned overflow before converting the
result to `i32`. (2) `log_data_meta_ratio` has clearer semantics.
0 commit comments