RFR : 8221696: MappedByteBuffer.force method to specify range
Alan Bateman
Alan.Bateman at oracle.com
Thu May 16 13:14:21 UTC 2019
On 14/05/2019 09:00, Andrew Dinn wrote:
> Hi Mikael,
>
> Thanks for looking at this.
>
> On 13/05/2019 17:41, Mikael Vidstedt wrote:
>>
>> Would it be worth putting the logic in an aptly named (private)
>> method? Something like:
>>
>> ...
>> private long alignDown(long address, long alignment) {
>> return address & <whatever>;
>> }
>> ...
>> long mapBase = alignDown(address, ps);
>> …
> Yes, that would probably be an improvement. However, I am afraid the
> ship has already sailed. I pushed the patch last night on the strength
> of an ok from Alan posted after he tested the patch on Windows and
> MacOS. Perhaps I should fix this in the push of the associated JEP
> implementation?
Mikael's suggestion seem okay. This is under the hood implementation so
doesn't matter if there is a follow-on issue or you include it in the
bigger patch. It might be easier to do the former while it's fresh in
our minds.
-Alan
More information about the core-libs-dev
mailing list