--- old/src/share/vm/services/memTracker.cpp 2015-03-20 10:29:09.157005000 -0700 +++ new/src/share/vm/services/memTracker.cpp 2015-03-20 10:29:09.071007000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,9 +47,9 @@ NMT_TrackingLevel MemTracker::init_tracking_level() { NMT_TrackingLevel level = NMT_off; char buf[64]; - char nmt_option[64]; jio_snprintf(buf, sizeof(buf), "NMT_LEVEL_%d", os::current_process_id()); - if (os::getenv(buf, nmt_option, sizeof(nmt_option))) { + const char *nmt_option = ::getenv(buf); + if (nmt_option != NULL) { if (strcmp(nmt_option, "summary") == 0) { level = NMT_summary; } else if (strcmp(nmt_option, "detail") == 0) { @@ -323,4 +323,3 @@ out->print_cr(" "); walker.report_statistics(out); } -