RFR: 8269537: memset() is called after operator new [v3]
Leo Korinth
lkorinth at openjdk.java.net
Tue Oct 19 13:06:57 UTC 2021
On Tue, 19 Oct 2021 13:01:10 GMT, Leo Korinth <lkorinth at 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
More information about the hotspot-dev
mailing list