Mercurial > hg > openjdk > hsx19
changeset 1665:04323991c395
6980262: Memory leak when exception is thrown in static initializer
Summary: Use resource memory instead of c-heap for the exception message
Reviewed-by: phh, jmasa
author | kamg |
---|---|
date | Fri, 27 Aug 2010 15:05:28 -0400 |
parents | 0652d205acda |
children | 5b0eb275c3d0 |
files | src/share/vm/oops/instanceKlass.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp Mon Aug 30 17:27:35 2010 -0700 +++ b/src/share/vm/oops/instanceKlass.cpp Fri Aug 27 15:05:28 2010 -0400 @@ -382,7 +382,7 @@ const char* desc = "Could not initialize class "; const char* className = this_oop->external_name(); size_t msglen = strlen(desc) + strlen(className) + 1; - char* message = NEW_C_HEAP_ARRAY(char, msglen); + char* message = NEW_RESOURCE_ARRAY(char, msglen); if (NULL == message) { // Out of memory: can't create detailed error message THROW_MSG(vmSymbols::java_lang_NoClassDefFoundError(), className);