RFR: Loan from old should align on region size
Y. Srinivas Ramakrishna
ysr at openjdk.org
Wed Feb 1 15:41:38 UTC 2023
On Wed, 1 Feb 2023 07:49:23 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> If you follow the computations, you'll see there's a "remnant" of memory that is leftover after we set aside certain regions to support young evacuations. That "remnant" is added into the allocation supplement. The remnant is what causes each of the individual values to possibly be unaligned.
>
> Thanks, yes, that makes sense. So may be leave a comment such as:
>
>
> // `available_loan_remnant' may contain a fractional region that was removed from the
> // whole number of regions that were loaned for young evacuation (the second addend below).
> // That loan remnant was added to the old bytes reserved for the allocation supplement (the first addend below).
> // As a result, their sum is back to being a whole number of regions; we only want to transfer
> // whole regions between the two generations.
>
>
> Or something to that effect. May be it's clear to the reader sufficiently versed with the logic of the accounting
> represented here, in which case feel free to ignore the suggestion of a comment.
In any case, since this is a stop-gap fix in code that's soon planned to be deleted, it's probably not worth further documentation or effort.
Ship it!
-------------
PR: https://git.openjdk.org/shenandoah/pull/213
More information about the shenandoah-dev
mailing list