RFR: Loan from old should align on region size

Kelvin Nilsen kdnilsen at openjdk.org
Wed Feb 1 16:58:44 UTC 2023


On Wed, 1 Feb 2023 02:57:07 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> This fixes an error detected by a recently added assertion on a different branch.  When loaning memory from old-gen to young-gen, it is important the total amount of the loan be an integral number of ShenandoahHeapRegions.  The total loan represents a sum of memory loaned to support young evacuations and memory loaned to support mutator allocations made while GC is active.  The sum of these two values is a multiple of region size.  The previous version of the code accidentally loaned only the memory dedicated to supporting mutator allocations, which is not necessarily a multiple of the region size.

> 

That's a good point.  In our previous loans, we could have been missing multiple regions that had been planned to be loaned, which were not loaned because of this error which is now fixed.

-------------

PR: https://git.openjdk.org/shenandoah/pull/213


More information about the shenandoah-dev mailing list