comparison src/share/vm/services/gcNotifier.cpp @ 11988:32e3bada0978

8020943: Memory leak when GCNotifier uses create_from_platform_dependent_str() Reviewed-by: mgerdin, fparain, dcubed
author kevinw
date Fri, 02 Aug 2013 12:26:46 +0100
parents da91efe96a93
children 592520c14121
comparison
equal deleted inserted replaced
11987:81e0f17ade64 11988:32e3bada0978
1 /* 1 /*
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
209 GCNotificationRequest *request = getRequest(); 209 GCNotificationRequest *request = getRequest();
210 if (request != NULL) { 210 if (request != NULL) {
211 NotificationMark nm(request); 211 NotificationMark nm(request);
212 Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD); 212 Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD);
213 213
214 Handle objName = java_lang_String::create_from_platform_dependent_str(request->gcManager->name(), CHECK); 214 Handle objName = java_lang_String::create_from_str(request->gcManager->name(), CHECK);
215 Handle objAction = java_lang_String::create_from_platform_dependent_str(request->gcAction, CHECK); 215 Handle objAction = java_lang_String::create_from_str(request->gcAction, CHECK);
216 Handle objCause = java_lang_String::create_from_platform_dependent_str(request->gcCause, CHECK); 216 Handle objCause = java_lang_String::create_from_str(request->gcCause, CHECK);
217 217
218 Klass* k = Management::sun_management_GarbageCollectorImpl_klass(CHECK); 218 Klass* k = Management::sun_management_GarbageCollectorImpl_klass(CHECK);
219 instanceKlassHandle gc_mbean_klass(THREAD, k); 219 instanceKlassHandle gc_mbean_klass(THREAD, k);
220 220
221 instanceOop gc_mbean = request->gcManager->get_memory_manager_instance(THREAD); 221 instanceOop gc_mbean = request->gcManager->get_memory_manager_instance(THREAD);