Integrated: 8325471: CHeapBitMap(MEMFLAGS flags) constructor misleading use of super-constructor

Axel Boldt-Christmas aboldtch at openjdk.org
Fri Feb 9 09:03:03 UTC 2024


On Thu, 8 Feb 2024 09:00:35 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 71b46c38
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/71b46c38a820319851cade2a15d64a657d4d7284
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8325471: CHeapBitMap(MEMFLAGS flags) constructor misleading use of super-constructor

Reviewed-by: stefank, tschatzl

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

PR: https://git.openjdk.org/jdk/pull/17768


More information about the hotspot-dev mailing list