RFR: 8296139: Make GrowableBitMap the base class of all implementations

Xin Liu xliu at openjdk.org
Wed Nov 2 06:01:10 UTC 2022


BitMap is an abstract class. All subclasses provide their own allocators. It is the allocator brings the capability to 'resize' the container. 
I would like to add a new 'GrowableBitmap' and make it the common base class. 

To substitute 'VectorSet', we also need to merge ResourceBitMap and ArenaBitMap because VectorSet supports Resource and Arena storage at the same time. 
This patch unifies them.  ResourceBitMap is a specialized ArenaBitMap whose allocator is with NULL arena.

All subclasses of GrowableBitMap are elastic. I will add new interface like VectorSet::test_set(index). It will grow to include the new index.

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

Commit messages:
 - Add unittest for Arena.
 - Avoid polluting namespace.
 - Change ResourceBitMap to subclass of ArenaBitMap.
 - Add GrowableBitMap.

Changes: https://git.openjdk.org/jdk/pull/10941/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10941&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296139
  Stats: 287 lines in 3 files changed: 98 ins; 136 del; 53 mod
  Patch: https://git.openjdk.org/jdk/pull/10941.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10941/head:pull/10941

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


More information about the hotspot-runtime-dev mailing list