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

Markus Gronlund markus.gronlund at oracle.com
Wed Aug 1 14:55:56 UTC 2018

Hi Dan,

Thanks for taking a look.

You saw that the os::unset_env() is still using SetEnvironmentVariable().


-----Original Message-----
From: Daniel D. Daugherty 
Sent: den 1 augusti 2018 16:31
To: Markus Gronlund <markus.gronlund at oracle.com>; hotspot-runtime-dev at openjdk.java.net
Subject: Re: [11] RFR(XS): 8207139: NMT is not enabled on Windows 2016/10

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