RFR: JDK-8293313: NMT: Rework MallocLimit [v2]

Thomas Stuefe stuefe at openjdk.org
Mon Jan 16 16:28:13 UTC 2023


On Mon, 16 Jan 2023 11:22:12 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8293313-NMT-fake-oom
>>  - MallocLimit
>
> src/hotspot/share/services/mallocLimit.cpp line 43:
> 
>> 41:   const char* const _s;
>> 42:   const char* const _end;
>> 43:   const char* _p;
> 
> Please add a comment for what these are! Or a general idea of what occurs (I assume `_p == _end` means that parsing has succeeded?)

It means end of input, eol. The ParserHelper is dumb, it does not know what successful parsing is. It just extracts stuff.

> src/hotspot/share/services/mallocLimit.hpp line 40:
> 
>> 38: struct malloclimit_t {
>> 39:   size_t v;               // Limit size
>> 40:   malloclimit_mode_t f;   // Behavior flags
> 
> Nit: `sz` and `lim` are short names that still gives more info than `v`, which is nice when reading the code.

Sure

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

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


More information about the hotspot-dev mailing list