RFR: 8327093: Add truncate function to BitMap API [v4]
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon Mar 11 06:47:55 UTC 2024
On Fri, 8 Mar 2024 16:51:10 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> The BitMap does not currently have a "slice" method which can return a subset of the bitmap defined by a start and end bit. This utility can be used to analyze portions of a bitmap or to overwrite the existing map with a shorter, modified map.
>>
>> This implementation has two core methods:
>> `copy_of_range` allocates and returns a new word array as used internally by BitMap
>> `truncate` overwrites the internal array with the one generated by `copy_of_range` so none of the internal workings are exposed to callers outside of BitMap.
>>
>> This change is verified with an included test.
>
> Matias Saavedra Silva has updated the pull request incrementally with two additional commits since the last revision:
>
> - Fixed CV-qualifier style
> - Axel comments and new test case
lgtm.
-------------
Marked as reviewed by aboldtch (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18092#pullrequestreview-1927027504
More information about the hotspot-dev
mailing list