[11] RFR(XS): 8207139: NMT is not enabled on Windows 2016/10

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Aug 1 14:31:18 UTC 2018

On 8/1/18 10:07 AM, Markus Gronlund wrote:
> Greetings,
> Kindly asking for a review for the following change set:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8207139
> Webrev: http://cr.openjdk.java.net/~mgronlun/8207139/webrev00/

     L61: #ifdef _WINDOWS
     L64:   nmt_env_value = GetEnvironmentVariable(nmt_env_variable, 
value, (DWORD)sizeof(value)) != 0 ? value : NULL;
     L65: #else
     L79:     os::unsetenv(nmt_env_variable);
         In the Windows case, you fetch the env variable from
         the PEB (via GetEnvironmentVariable()), but you unset
         it via 'os::unsetenv()'. I'm assuming that unsetenv()
         is working with the CRT env variables so I'm wondering
         if there might be confusion.

         Update: Looks like os::unsetenv() in
         src/hotspot/os/windows/os_windows.cpp calls
         SetEnvironmentVariable() so I think everyone is on the
         same page.

Thumbs up!


> Testing: hotspot_nmt
> Please see the bug for further details about this problem.
> Thanks in advance
> Markus

More information about the hotspot-runtime-dev mailing list