On Tue, 19 Oct 2021 13:01:10 GMT, Leo Korinth <lkori...@openjdk.org> wrote:
>> src/hotspot/share/memory/allocation.hpp line 398: >> >>> 396: class ResourceObj ALLOCATION_SUPER_CLASS_SPEC { >>> 397: public: >>> 398: enum allocation_type : uint8_t { STACK_OR_EMBEDDED, RESOURCE_AREA, >>> C_HEAP, ARENA }; >> >> Consider adding an "empty" allocation-type, that indicates an entry in the >> RecentAllocations is unused. > > After thinking a bit, I will not add an "empty" value. It will make it harder > to make functions "total" that matches on the enum, and the "empty" value > does not really need to be reset in RecentAllocations. STACK_OR_EMBEDDED is kind of a nice neutral element "mempty" in my opinion. ------------- PR: https://git.openjdk.java.net/jdk/pull/5387