RFR: 8269537: memset() is called after operator new [v3]
Leo Korinth
lkorinth at openjdk.java.net
Tue Oct 19 13:06:56 UTC 2021
On Thu, 7 Oct 2021 06:12:07 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use a thread local buffer so that the compiler might reorder operator new.
>
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5387
More information about the hotspot-dev
mailing list