RFR: 8325471: CHeapBitMap(MEMFLAGS flags) constructor misleading use of super-constructor
Axel Boldt-Christmas
aboldtch at openjdk.org
Thu Feb 8 09:04:06 UTC 2024
The `explicit CHeapBitMap(MEMFLAGS flags)` calls the `GrowableBitMap(bm_word_t* map, idx_t size_in_bits)` super-constructor with `GrowableBitMap(0, false)`. This works because `0` gets converted to `nullptr` and `false` gets converted to `0`. However this seems to have be a miss in the most recent refactoring and is misleading.
`explicit CHeapBitMap(MEMFLAGS flags)` should use `GrowableBitMap()` directly which creates an empty (uninitialised) bitmap.
-------------
Commit messages:
- 8325471: CHeapBitMap(MEMFLAGS flags) constructor misleading use of super-constructor
Changes: https://git.openjdk.org/jdk/pull/17768/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17768&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325471
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17768.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17768/head:pull/17768
PR: https://git.openjdk.org/jdk/pull/17768
More information about the hotspot-dev
mailing list