On Fri, 30 Jul 2021 16:36:41 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:

>> src/hotspot/share/services/nmtPreInit.hpp line 309:
>> 
>>> 307:         ::memcpy(p_new, a->payload(), MIN2(a->size, new_size));
>>> 308:         (*rc) = p_new;
>>> 309:         _num_reallocs_pre_to_post++;
>> 
>> post-NMT-init counter updates are racy.
>
> True, this is racy. It's just for diagnostics though - I rather remove them 
> than make them atomic since we would pay for this with every malloc. Or, 
> maybe atomic + debug only?

Either one is fine.

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

PR: https://git.openjdk.java.net/jdk/pull/4874

Reply via email to