OpenJDK / portola / portola
changeset 27880:afb974a04396
8060074: os::free() takes MemoryTrackingLevel but doesn't need it
Summary: Cleaned up unused arguments in os::free and it's callers.
Reviewed-by: lfoltan, coleenp, ctornqvi, dholmes
Contributed-by: max.ockner@oracle.com
line wrap: on
line diff
--- a/hotspot/src/os/aix/vm/os_aix.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/aix/vm/os_aix.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -571,7 +571,7 @@ char *ld_library_path = (char *)NEW_C_HEAP_ARRAY(char, strlen(v) + 1 + sizeof(DEFAULT_LIBPATH) + 1, mtInternal); sprintf(ld_library_path, "%s%s" DEFAULT_LIBPATH, v, v_colon); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal); + FREE_C_HEAP_ARRAY(char, ld_library_path); // Extensions directories. sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); @@ -581,7 +581,7 @@ sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); Arguments::set_endorsed_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #undef DEFAULT_LIBPATH #undef EXTENSIONS_DIR @@ -1307,11 +1307,11 @@ // release the storage for (int i = 0; i < n; i++) { if (pelements[i] != NULL) { - FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal); + FREE_C_HEAP_ARRAY(char, pelements[i]); } } if (pelements != NULL) { - FREE_C_HEAP_ARRAY(char*, pelements, mtInternal); + FREE_C_HEAP_ARRAY(char*, pelements); } } else { snprintf(buffer, buflen, "%s/lib%s.so", pname, fname);
--- a/hotspot/src/os/aix/vm/perfMemory_aix.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/aix/vm/perfMemory_aix.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright 2012, 2013 SAP AG. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -127,7 +127,7 @@ } } } - FREE_C_HEAP_ARRAY(char, destfile, mtInternal); + FREE_C_HEAP_ARRAY(char, destfile); } @@ -279,14 +279,14 @@ "pw_name zero length"); } } - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return NULL; } char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal); strcpy(user_name, p->pw_name); - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return user_name; } @@ -347,7 +347,7 @@ DIR* subdirp = os::opendir(usrdir_name); if (subdirp == NULL) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); continue; } @@ -358,7 +358,7 @@ // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); os::closedir(subdirp); continue; } @@ -382,13 +382,13 @@ // don't follow symbolic links for the file RESTARTABLE(::lstat(filename, &statbuf), result); if (result == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } // skip over files that are not regular files. if (!S_ISREG(statbuf.st_mode)) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } @@ -398,7 +398,7 @@ if (statbuf.st_ctime > oldest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal); + if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(oldest_user, user); @@ -406,15 +406,15 @@ } } - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf, mtInternal); - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -481,7 +481,7 @@ remove_file(path); - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } @@ -558,7 +558,7 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if @@ -703,11 +703,11 @@ fd = create_sharedmem_resources(dirname, filename, size); - FREE_C_HEAP_ARRAY(char, user_name, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, user_name); + FREE_C_HEAP_ARRAY(char, dirname); if (fd == -1) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -723,7 +723,7 @@ warning("mmap failed - %s\n", strerror(errno)); } remove_file(filename); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -769,7 +769,7 @@ remove_file(backing_store_file_name); // Don't.. Free heap memory could deadlock os::abort() if it is called // from signal handler. OS will reclaim the heap memory. - // FREE_C_HEAP_ARRAY(char, backing_store_file_name, mtInternal); + // FREE_C_HEAP_ARRAY(char, backing_store_file_name); backing_store_file_name = NULL; } } @@ -853,9 +853,9 @@ // store file, we don't follow them when attaching either. // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname); if (luser != user) { - FREE_C_HEAP_ARRAY(char, luser, mtInternal); + FREE_C_HEAP_ARRAY(char, luser); } THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); @@ -871,9 +871,9 @@ strcpy(rfilename, filename); // free the c heap resources that are no longer needed - if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); // open the shared memory file for the give vmid fd = open_sharedmem_file(rfilename, file_flags, CHECK);
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -418,7 +418,7 @@ mtInternal); sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal); + FREE_C_HEAP_ARRAY(char, ld_library_path); } // Extensions directories. @@ -429,7 +429,7 @@ sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); Arguments::set_endorsed_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #else // __APPLE__ @@ -513,7 +513,7 @@ sprintf(ld_library_path, "%s%s%s%s%s" SYS_EXTENSIONS_DIR ":" SYS_EXTENSIONS_DIRS ":.", v, v_colon, l, l_colon, user_home_dir); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal); + FREE_C_HEAP_ARRAY(char, ld_library_path); } // Extensions directories. @@ -529,7 +529,7 @@ sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); Arguments::set_endorsed_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #undef SYS_EXTENSIONS_DIR #undef SYS_EXTENSIONS_DIRS @@ -1315,11 +1315,11 @@ // release the storage for (int i = 0; i < n; i++) { if (pelements[i] != NULL) { - FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal); + FREE_C_HEAP_ARRAY(char, pelements[i]); } } if (pelements != NULL) { - FREE_C_HEAP_ARRAY(char*, pelements, mtInternal); + FREE_C_HEAP_ARRAY(char*, pelements); } } else { snprintf(buffer, buflen, "%s/" JNI_LIB_PREFIX "%s" JNI_LIB_SUFFIX, pname, fname);
--- a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -127,7 +127,7 @@ } } } - FREE_C_HEAP_ARRAY(char, destfile, mtInternal); + FREE_C_HEAP_ARRAY(char, destfile); } @@ -279,14 +279,14 @@ "pw_name zero length"); } } - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return NULL; } char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal); strcpy(user_name, p->pw_name); - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return user_name; } @@ -347,7 +347,7 @@ DIR* subdirp = os::opendir(usrdir_name); if (subdirp == NULL) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); continue; } @@ -358,7 +358,7 @@ // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); os::closedir(subdirp); continue; } @@ -382,13 +382,13 @@ // don't follow symbolic links for the file RESTARTABLE(::lstat(filename, &statbuf), result); if (result == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } // skip over files that are not regular files. if (!S_ISREG(statbuf.st_mode)) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } @@ -398,7 +398,7 @@ if (statbuf.st_ctime > oldest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal); + if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(oldest_user, user); @@ -406,15 +406,15 @@ } } - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf, mtInternal); - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -481,7 +481,7 @@ remove_file(path); - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } @@ -558,7 +558,7 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if @@ -725,11 +725,11 @@ fd = create_sharedmem_resources(dirname, filename, size); - FREE_C_HEAP_ARRAY(char, user_name, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, user_name); + FREE_C_HEAP_ARRAY(char, dirname); if (fd == -1) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -743,7 +743,7 @@ warning("mmap failed - %s\n", strerror(errno)); } remove_file(filename); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -872,9 +872,9 @@ // store file, we don't follow them when attaching either. // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname); if (luser != user) { - FREE_C_HEAP_ARRAY(char, luser, mtInternal); + FREE_C_HEAP_ARRAY(char, luser); } THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); @@ -890,9 +890,9 @@ strcpy(rfilename, filename); // free the c heap resources that are no longer needed - if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); // open the shared memory file for the give vmid fd = open_sharedmem_file(rfilename, file_flags, CHECK);
--- a/hotspot/src/os/linux/vm/os_linux.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/linux/vm/os_linux.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -403,7 +403,7 @@ mtInternal); sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal); + FREE_C_HEAP_ARRAY(char, ld_library_path); } // Extensions directories. @@ -414,7 +414,7 @@ sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); Arguments::set_endorsed_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #undef DEFAULT_LIBPATH #undef SYS_EXT_DIR @@ -1620,11 +1620,11 @@ // release the storage for (int i = 0; i < n; i++) { if (pelements[i] != NULL) { - FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal); + FREE_C_HEAP_ARRAY(char, pelements[i]); } } if (pelements != NULL) { - FREE_C_HEAP_ARRAY(char*, pelements, mtInternal); + FREE_C_HEAP_ARRAY(char*, pelements); } } else { snprintf(buffer, buflen, "%s/lib%s.so", pname, fname); @@ -2935,7 +2935,7 @@ } } } - FREE_C_HEAP_ARRAY(unsigned long, cpu_map, mtInternal); + FREE_C_HEAP_ARRAY(unsigned long, cpu_map); } int os::Linux::get_node_by_cpu(int cpu_id) {
--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -127,7 +127,7 @@ } } } - FREE_C_HEAP_ARRAY(char, destfile, mtInternal); + FREE_C_HEAP_ARRAY(char, destfile); } @@ -279,14 +279,14 @@ "pw_name zero length"); } } - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return NULL; } char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal); strcpy(user_name, p->pw_name); - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return user_name; } @@ -347,7 +347,7 @@ DIR* subdirp = os::opendir(usrdir_name); if (subdirp == NULL) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); continue; } @@ -358,7 +358,7 @@ // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); os::closedir(subdirp); continue; } @@ -382,13 +382,13 @@ // don't follow symbolic links for the file RESTARTABLE(::lstat(filename, &statbuf), result); if (result == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } // skip over files that are not regular files. if (!S_ISREG(statbuf.st_mode)) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } @@ -398,7 +398,7 @@ if (statbuf.st_ctime > oldest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal); + if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(oldest_user, user); @@ -406,15 +406,15 @@ } } - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf, mtInternal); - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -481,7 +481,7 @@ remove_file(path); - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } @@ -558,7 +558,7 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if @@ -725,11 +725,11 @@ fd = create_sharedmem_resources(dirname, filename, size); - FREE_C_HEAP_ARRAY(char, user_name, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, user_name); + FREE_C_HEAP_ARRAY(char, dirname); if (fd == -1) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -743,7 +743,7 @@ warning("mmap failed - %s\n", strerror(errno)); } remove_file(filename); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -872,9 +872,9 @@ // store file, we don't follow them when attaching either. // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname); if (luser != user) { - FREE_C_HEAP_ARRAY(char, luser, mtInternal); + FREE_C_HEAP_ARRAY(char, luser); } THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); @@ -890,9 +890,9 @@ strcpy(rfilename, filename); // free the c heap resources that are no longer needed - if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); // open the shared memory file for the give vmid fd = open_sharedmem_file(rfilename, file_flags, THREAD);
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -506,7 +506,7 @@ } } if (available_id != NULL) { - FREE_C_HEAP_ARRAY(bool, available_id, mtInternal); + FREE_C_HEAP_ARRAY(bool, available_id); } return true; } @@ -538,7 +538,7 @@ } } if (id_array != NULL) { - FREE_C_HEAP_ARRAY(processorid_t, id_array, mtInternal); + FREE_C_HEAP_ARRAY(processorid_t, id_array); } return result; } @@ -675,7 +675,7 @@ // Determine search path count and required buffer size. if (dlinfo(RTLD_SELF, RTLD_DI_SERINFOSIZE, (void *)info) == -1) { - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); vm_exit_during_initialization("dlinfo SERINFOSIZE request", dlerror()); } @@ -686,8 +686,8 @@ // Obtain search path information. if (dlinfo(RTLD_SELF, RTLD_DI_SERINFO, (void *)info) == -1) { - FREE_C_HEAP_ARRAY(char, buf, mtInternal); - FREE_C_HEAP_ARRAY(char, info, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(char, info); vm_exit_during_initialization("dlinfo SERINFO request", dlerror()); } @@ -757,8 +757,8 @@ // Callee copies into its own buffer. Arguments::set_library_path(library_path); - FREE_C_HEAP_ARRAY(char, library_path, mtInternal); - FREE_C_HEAP_ARRAY(char, info, mtInternal); + FREE_C_HEAP_ARRAY(char, library_path); + FREE_C_HEAP_ARRAY(char, info); } // Extensions directories. @@ -769,7 +769,7 @@ sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); Arguments::set_endorsed_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #undef SYS_EXT_DIR #undef EXTENSIONS_DIR @@ -1599,11 +1599,11 @@ // release the storage for (int i = 0; i < n; i++) { if (pelements[i] != NULL) { - FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal); + FREE_C_HEAP_ARRAY(char, pelements[i]); } } if (pelements != NULL) { - FREE_C_HEAP_ARRAY(char*, pelements, mtInternal); + FREE_C_HEAP_ARRAY(char*, pelements); } } else { snprintf(buffer, buflen, "%s/lib%s.so", pname, fname); @@ -4681,7 +4681,7 @@ size_t lgrp_limit = os::numa_get_groups_num(); int *lgrp_ids = NEW_C_HEAP_ARRAY(int, lgrp_limit, mtInternal); size_t lgrp_num = os::numa_get_leaf_groups(lgrp_ids, lgrp_limit); - FREE_C_HEAP_ARRAY(int, lgrp_ids, mtInternal); + FREE_C_HEAP_ARRAY(int, lgrp_ids); if (lgrp_num < 2) { // There's only one locality group, disable NUMA. UseNUMA = false;
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -129,7 +129,7 @@ } } } - FREE_C_HEAP_ARRAY(char, destfile, mtInternal); + FREE_C_HEAP_ARRAY(char, destfile); } @@ -270,14 +270,14 @@ "pw_name zero length"); } } - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return NULL; } char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal); strcpy(user_name, p->pw_name); - FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, pwbuf); return user_name; } @@ -338,7 +338,7 @@ DIR* subdirp = os::opendir(usrdir_name); if (subdirp == NULL) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); continue; } @@ -349,7 +349,7 @@ // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); os::closedir(subdirp); continue; } @@ -373,13 +373,13 @@ // don't follow symbolic links for the file RESTARTABLE(::lstat(filename, &statbuf), result); if (result == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } // skip over files that are not regular files. if (!S_ISREG(statbuf.st_mode)) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } @@ -389,7 +389,7 @@ if (statbuf.st_ctime > oldest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal); + if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(oldest_user, user); @@ -397,15 +397,15 @@ } } - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf, mtInternal); - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -520,7 +520,7 @@ remove_file(path); - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } @@ -597,7 +597,7 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if @@ -742,11 +742,11 @@ fd = create_sharedmem_resources(dirname, filename, size); - FREE_C_HEAP_ARRAY(char, user_name, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, user_name); + FREE_C_HEAP_ARRAY(char, dirname); if (fd == -1) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -760,7 +760,7 @@ warning("mmap failed - %s\n", strerror(errno)); } remove_file(filename); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); return NULL; } @@ -890,9 +890,9 @@ // store file, we don't follow them when attaching either. // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname); if (luser != user) { - FREE_C_HEAP_ARRAY(char, luser, mtInternal); + FREE_C_HEAP_ARRAY(char, luser); } THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); @@ -908,9 +908,9 @@ strcpy(rfilename, filename); // free the c heap resources that are no longer needed - if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); // open the shared memory file for the give vmid fd = open_sharedmem_file(rfilename, file_flags, THREAD);
--- a/hotspot/src/os/windows/vm/os_windows.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/windows/vm/os_windows.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -211,7 +211,7 @@ } strcpy(home_path, home_dir); Arguments::set_java_home(home_path); - FREE_C_HEAP_ARRAY(char, home_path, mtInternal); + FREE_C_HEAP_ARRAY(char, home_path); dll_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + strlen(bin) + 1, mtInternal); @@ -221,7 +221,7 @@ strcpy(dll_path, home_dir); strcat(dll_path, bin); Arguments::set_dll_dir(dll_path); - FREE_C_HEAP_ARRAY(char, dll_path, mtInternal); + FREE_C_HEAP_ARRAY(char, dll_path); if (!set_boot_path('\\', ';')) { return; @@ -276,7 +276,7 @@ strcat(library_path, ";."); Arguments::set_library_path(library_path); - FREE_C_HEAP_ARRAY(char, library_path, mtInternal); + FREE_C_HEAP_ARRAY(char, library_path); } // Default extensions directory @@ -301,7 +301,7 @@ Arguments::set_endorsed_dirs(buf); // (Arguments::set_endorsed_dirs() calls SystemProperty::set_value(), which // duplicates the input.) - FREE_C_HEAP_ARRAY(char, buf, mtInternal); + FREE_C_HEAP_ARRAY(char, buf); #undef ENDORSED_DIR } @@ -1136,7 +1136,7 @@ dirp->path = (char *)malloc(strlen(dirname) + 5, mtInternal); if (dirp->path == 0) { - free(dirp, mtInternal); + free(dirp); errno = ENOMEM; return 0; } @@ -1144,13 +1144,13 @@ fattr = GetFileAttributes(dirp->path); if (fattr == 0xffffffff) { - free(dirp->path, mtInternal); - free(dirp, mtInternal); + free(dirp->path); + free(dirp); errno = ENOENT; return 0; } else if ((fattr & FILE_ATTRIBUTE_DIRECTORY) == 0) { - free(dirp->path, mtInternal); - free(dirp, mtInternal); + free(dirp->path); + free(dirp); errno = ENOTDIR; return 0; } @@ -1168,8 +1168,8 @@ dirp->handle = FindFirstFile(dirp->path, &dirp->find_data); if (dirp->handle == INVALID_HANDLE_VALUE) { if (GetLastError() != ERROR_FILE_NOT_FOUND) { - free(dirp->path, mtInternal); - free(dirp, mtInternal); + free(dirp->path); + free(dirp); errno = EACCES; return 0; } @@ -1207,8 +1207,8 @@ } dirp->handle = INVALID_HANDLE_VALUE; } - free(dirp->path, mtInternal); - free(dirp, mtInternal); + free(dirp->path); + free(dirp); return 0; } @@ -1275,11 +1275,11 @@ // release the storage for (int i = 0; i < n; i++) { if (pelements[i] != NULL) { - FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal); + FREE_C_HEAP_ARRAY(char, pelements[i]); } } if (pelements != NULL) { - FREE_C_HEAP_ARRAY(char*, pelements, mtInternal); + FREE_C_HEAP_ARRAY(char*, pelements); } } else { jio_snprintf(buffer, buflen, "%s\\%s.dll", pname, fname); @@ -2745,7 +2745,7 @@ void free_node_list() { if (_numa_used_node_list != NULL) { - FREE_C_HEAP_ARRAY(int, _numa_used_node_list, mtInternal); + FREE_C_HEAP_ARRAY(int, _numa_used_node_list); } } @@ -4642,7 +4642,7 @@ error = ::PeekConsoleInput(han, lpBuffer, numEvents, &numEventsRead); if (error == 0) { - os::free(lpBuffer, mtInternal); + os::free(lpBuffer); return FALSE; } @@ -4663,7 +4663,7 @@ } if (lpBuffer != NULL) { - os::free(lpBuffer, mtInternal); + os::free(lpBuffer); } *pbytes = (long) actualLength;
--- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -122,7 +122,7 @@ } } - FREE_C_HEAP_ARRAY(char, destfile, mtInternal); + FREE_C_HEAP_ARRAY(char, destfile); } // Shared Memory Implementation Details @@ -335,7 +335,7 @@ DIR* subdirp = os::opendir(usrdir_name); if (subdirp == NULL) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); continue; } @@ -346,7 +346,7 @@ // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, usrdir_name); os::closedir(subdirp); continue; } @@ -367,13 +367,13 @@ strcat(filename, udentry->d_name); if (::stat(filename, &statbuf) == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } // skip over files that are not regular files. if ((statbuf.st_mode & S_IFMT) != S_IFREG) { - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); continue; } @@ -395,22 +395,22 @@ if (statbuf.st_ctime > latest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - if (latest_user != NULL) FREE_C_HEAP_ARRAY(char, latest_user, mtInternal); + if (latest_user != NULL) FREE_C_HEAP_ARRAY(char, latest_user); latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(latest_user, user); latest_ctime = statbuf.st_ctime; } - FREE_C_HEAP_ARRAY(char, filename, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf, mtInternal); - FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, tdbuf); return(latest_user); } @@ -502,7 +502,7 @@ } } - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } // returns true if the process represented by pid is alive, otherwise @@ -683,7 +683,7 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); } // create a file mapping object with the requested name, and size @@ -749,11 +749,11 @@ // be an ACL we enlisted. free the resources. // if (success && exists && pACL != NULL && !isdefault) { - FREE_C_HEAP_ARRAY(char, pACL, mtInternal); + FREE_C_HEAP_ARRAY(char, pACL); } // free the security descriptor - FREE_C_HEAP_ARRAY(char, pSD, mtInternal); + FREE_C_HEAP_ARRAY(char, pSD); } } @@ -768,7 +768,7 @@ lpSA->lpSecurityDescriptor = NULL; // free the security attributes structure - FREE_C_HEAP_ARRAY(char, lpSA, mtInternal); + FREE_C_HEAP_ARRAY(char, lpSA); } } @@ -815,7 +815,7 @@ warning("GetTokenInformation failure: lasterror = %d," " rsize = %d\n", GetLastError(), rsize); } - FREE_C_HEAP_ARRAY(char, token_buf, mtInternal); + FREE_C_HEAP_ARRAY(char, token_buf); CloseHandle(hAccessToken); return NULL; } @@ -828,15 +828,15 @@ warning("GetTokenInformation failure: lasterror = %d," " rsize = %d\n", GetLastError(), rsize); } - FREE_C_HEAP_ARRAY(char, token_buf, mtInternal); - FREE_C_HEAP_ARRAY(char, pSID, mtInternal); + FREE_C_HEAP_ARRAY(char, token_buf); + FREE_C_HEAP_ARRAY(char, pSID); CloseHandle(hAccessToken); return NULL; } // close the access token. CloseHandle(hAccessToken); - FREE_C_HEAP_ARRAY(char, token_buf, mtInternal); + FREE_C_HEAP_ARRAY(char, token_buf); return pSID; } @@ -920,7 +920,7 @@ if (PrintMiscellaneous && Verbose) { warning("InitializeAcl failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } @@ -933,7 +933,7 @@ if (PrintMiscellaneous && Verbose) { warning("InitializeAcl failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceFlags && INHERITED_ACE) { @@ -960,7 +960,7 @@ if (PrintMiscellaneous && Verbose) { warning("AddAce failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } } @@ -976,7 +976,7 @@ warning("AddAccessAllowedAce failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } } @@ -991,7 +991,7 @@ if (PrintMiscellaneous && Verbose) { warning("InitializeAcl failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } if (!AddAce(newACL, ACL_REVISION, MAXDWORD, ace, @@ -999,7 +999,7 @@ if (PrintMiscellaneous && Verbose) { warning("AddAce failure: lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } ace_index++; @@ -1012,7 +1012,7 @@ warning("SetSecurityDescriptorDacl failure:" " lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } @@ -1032,7 +1032,7 @@ warning("SetSecurityDescriptorControl failure:" " lasterror = %d \n", GetLastError()); } - FREE_C_HEAP_ARRAY(char, newACL, mtInternal); + FREE_C_HEAP_ARRAY(char, newACL); return false; } } @@ -1149,7 +1149,7 @@ // create a security attributes structure with access control // entries as initialized above. LPSECURITY_ATTRIBUTES lpSA = make_security_attr(aces, 3); - FREE_C_HEAP_ARRAY(char, aces[0].pSid, mtInternal); + FREE_C_HEAP_ARRAY(char, aces[0].pSid); FreeSid(everybodySid); FreeSid(administratorsSid); return(lpSA); @@ -1464,15 +1464,15 @@ assert(((size != 0) && (size % os::vm_page_size() == 0)), "unexpected PerfMemry region size"); - FREE_C_HEAP_ARRAY(char, user, mtInternal); + FREE_C_HEAP_ARRAY(char, user); // create the shared memory resources sharedmem_fileMapHandle = create_sharedmem_resources(dirname, filename, objectname, size); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); - FREE_C_HEAP_ARRAY(char, objectname, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(char, objectname); + FREE_C_HEAP_ARRAY(char, dirname); if (sharedmem_fileMapHandle == NULL) { return NULL; @@ -1627,7 +1627,7 @@ // store file, we also don't following them when attaching // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname); THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); } @@ -1646,10 +1646,10 @@ strcpy(robjectname, objectname); // free the c heap resources that are no longer needed - if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); - FREE_C_HEAP_ARRAY(char, dirname, mtInternal); - FREE_C_HEAP_ARRAY(char, filename, mtInternal); - FREE_C_HEAP_ARRAY(char, objectname, mtInternal); + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(char, objectname); if (*sizep == 0) { size = sharedmem_filesize(rfilename, CHECK);
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/asm/codeBuffer.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1025,7 +1025,7 @@ ~CodeString() { assert(_next == NULL, "wrong interface for freeing list"); - os::free((void*)_string, mtCode); + os::free((void*)_string); } bool is_comment() const { return _offset >= 0; }
--- a/hotspot/src/share/vm/classfile/classLoader.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/classfile/classLoader.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -161,7 +161,7 @@ MetaIndex::~MetaIndex() { - FREE_C_HEAP_ARRAY(char*, _meta_package_names, mtClass); + FREE_C_HEAP_ARRAY(char*, _meta_package_names); } @@ -247,7 +247,7 @@ if (ZipClose != NULL) { (*ZipClose)(_zip); } - FREE_C_HEAP_ARRAY(char, _zip_name, mtClass); + FREE_C_HEAP_ARRAY(char, _zip_name); } u1* ClassPathZipEntry::open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS) {
--- a/hotspot/src/share/vm/classfile/loaderConstraints.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/classfile/loaderConstraints.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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 @@ -164,7 +164,7 @@ // Purge entry *p = probe->next(); - FREE_C_HEAP_ARRAY(oop, probe->loaders(), mtClass); + FREE_C_HEAP_ARRAY(oop, probe->loaders()); free_entry(probe); } else { #ifdef ASSERT @@ -340,7 +340,7 @@ ClassLoaderData** new_loaders = NEW_C_HEAP_ARRAY(ClassLoaderData*, n, mtClass); memcpy(new_loaders, p->loaders(), sizeof(ClassLoaderData*) * p->num_loaders()); p->set_max_loaders(n); - FREE_C_HEAP_ARRAY(ClassLoaderData*, p->loaders(), mtClass); + FREE_C_HEAP_ARRAY(ClassLoaderData*, p->loaders()); p->set_loaders(new_loaders); } } @@ -422,7 +422,7 @@ } *pp2 = p2->next(); - FREE_C_HEAP_ARRAY(oop, p2->loaders(), mtClass); + FREE_C_HEAP_ARRAY(oop, p2->loaders()); free_entry(p2); return; }
--- a/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -89,7 +89,7 @@ } ~SharedPathsMiscInfo() { if (_allocated) { - FREE_C_HEAP_ARRAY(char, _buf_start, mtClass); + FREE_C_HEAP_ARRAY(char, _buf_start); } } int get_used_bytes() {
--- a/hotspot/src/share/vm/code/codeBlob.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/code/codeBlob.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -168,7 +168,7 @@ void CodeBlob::flush() { if (_oop_maps) { - FREE_C_HEAP_ARRAY(unsigned char, _oop_maps, mtCode); + FREE_C_HEAP_ARRAY(unsigned char, _oop_maps); _oop_maps = NULL; } _strings.free();
--- a/hotspot/src/share/vm/code/codeCache.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/code/codeCache.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1190,7 +1190,7 @@ } } - FREE_C_HEAP_ARRAY(int, buckets, mtCode); + FREE_C_HEAP_ARRAY(int, buckets); print_memory_overhead(); }
--- a/hotspot/src/share/vm/compiler/compileLog.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/compiler/compileLog.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -58,8 +58,8 @@ CompileLog::~CompileLog() { delete _out; _out = NULL; - FREE_C_HEAP_ARRAY(char, _identities, mtCompiler); - FREE_C_HEAP_ARRAY(char, _file, mtCompiler); + FREE_C_HEAP_ARRAY(char, _identities); + FREE_C_HEAP_ARRAY(char, _file); }
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -653,15 +653,15 @@ || _cursor == NULL) { warning("Failed to allocate survivor plab/chunk array"); if (_survivor_plab_array != NULL) { - FREE_C_HEAP_ARRAY(ChunkArray, _survivor_plab_array, mtGC); + FREE_C_HEAP_ARRAY(ChunkArray, _survivor_plab_array); _survivor_plab_array = NULL; } if (_survivor_chunk_array != NULL) { - FREE_C_HEAP_ARRAY(HeapWord*, _survivor_chunk_array, mtGC); + FREE_C_HEAP_ARRAY(HeapWord*, _survivor_chunk_array); _survivor_chunk_array = NULL; } if (_cursor != NULL) { - FREE_C_HEAP_ARRAY(size_t, _cursor, mtGC); + FREE_C_HEAP_ARRAY(size_t, _cursor); _cursor = NULL; } } else { @@ -671,10 +671,10 @@ if (vec == NULL) { warning("Failed to allocate survivor plab array"); for (int j = i; j > 0; j--) { - FREE_C_HEAP_ARRAY(HeapWord*, _survivor_plab_array[j-1].array(), mtGC); + FREE_C_HEAP_ARRAY(HeapWord*, _survivor_plab_array[j-1].array()); } - FREE_C_HEAP_ARRAY(ChunkArray, _survivor_plab_array, mtGC); - FREE_C_HEAP_ARRAY(HeapWord*, _survivor_chunk_array, mtGC); + FREE_C_HEAP_ARRAY(ChunkArray, _survivor_plab_array); + FREE_C_HEAP_ARRAY(HeapWord*, _survivor_chunk_array); _survivor_plab_array = NULL; _survivor_chunk_array = NULL; _survivor_chunk_capacity = 0;
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -107,7 +107,7 @@ for (uint i = 0; i < _n_threads; i++) { delete _threads[i]; } - FREE_C_HEAP_ARRAY(ConcurrentG1RefineThread*, _threads, mtGC); + FREE_C_HEAP_ARRAY(ConcurrentG1RefineThread*, _threads); } }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -111,13 +111,13 @@ // read next before freeing. e = e->next(); unlink_entry(to_remove); - FREE_C_HEAP_ARRAY(char, to_remove, mtGC); + FREE_C_HEAP_ARRAY(char, to_remove); } } assert(number_of_entries() == 0, "should have removed all entries"); free_buckets(); for (BasicHashtableEntry<mtGC>* e = new_entry_free_list(); e != NULL; e = new_entry_free_list()) { - FREE_C_HEAP_ARRAY(char, e, mtGC); + FREE_C_HEAP_ARRAY(char, e); } }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -3561,7 +3561,7 @@ void G1CollectedHeap::cleanup_surviving_young_words() { guarantee( _surviving_young_words != NULL, "pre-condition" ); - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words, mtGC); + FREE_C_HEAP_ARRAY(size_t, _surviving_young_words); _surviving_young_words = NULL; }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -53,7 +53,7 @@ } ~WorkerDataArray() { - FREE_C_HEAP_ARRAY(T, _data, mtGC); + FREE_C_HEAP_ARRAY(T, _data); } void set(uint worker_i, T value) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, 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 @@ -53,7 +53,7 @@ G1HotCardCache::~G1HotCardCache() { if (default_use_cache()) { assert(_hot_cache != NULL, "Logic"); - FREE_C_HEAP_ARRAY(jbyte*, _hot_cache, mtGC); + FREE_C_HEAP_ARRAY(jbyte*, _hot_cache); } }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -65,7 +65,7 @@ G1ParScanThreadState::~G1ParScanThreadState() { _g1_par_allocator->retire_alloc_buffers(); delete _g1_par_allocator; - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base, mtGC); + FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); } void
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -94,7 +94,7 @@ for (uint i = 0; i < n_workers(); i++) { assert(_cset_rs_update_cl[i] == NULL, "it should be"); } - FREE_C_HEAP_ARRAY(OopsInHeapRegionClosure*, _cset_rs_update_cl, mtGC); + FREE_C_HEAP_ARRAY(OopsInHeapRegionClosure*, _cset_rs_update_cl); } class ScanRSClosure : public HeapRegionClosure { @@ -353,7 +353,7 @@ for (uint i = 0; i < n_workers(); ++i) { _total_cards_scanned += _cards_scanned[i]; } - FREE_C_HEAP_ARRAY(size_t, _cards_scanned, mtGC); + FREE_C_HEAP_ARRAY(size_t, _cards_scanned); _cards_scanned = NULL; // Cleanup after copy _g1->set_refine_cte_cl_concurrency(true);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, 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 @@ -59,7 +59,7 @@ void free_and_null() { if (_rs_threads_vtimes) { - FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes, mtGC); + FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes); _rs_threads_vtimes = NULL; _num_vtimes = 0; }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -187,7 +187,7 @@ } G1StringDedupTable::~G1StringDedupTable() { - FREE_C_HEAP_ARRAY(G1StringDedupEntry*, _buckets, mtGC); + FREE_C_HEAP_ARRAY(G1StringDedupEntry*, _buckets); } void G1StringDedupTable::create() {
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -449,7 +449,7 @@ HeapRegionClaimer::~HeapRegionClaimer() { if (_claims != NULL) { - FREE_C_HEAP_ARRAY(uint, _claims, mtGC); + FREE_C_HEAP_ARRAY(uint, _claims); } }
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -449,5 +449,5 @@ bot_storage->uncommit_regions(0, num_regions_in_test); delete bot_storage; - FREE_C_HEAP_ARRAY(HeapWord, bot_data, mtGC); + FREE_C_HEAP_ARRAY(HeapWord, bot_data); }
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -129,7 +129,7 @@ assert(_buf_free_list != NULL, "_buf_free_list_sz must be wrong."); void* b = BufferNode::make_block_from_node(_buf_free_list); _buf_free_list = _buf_free_list->next(); - FREE_C_HEAP_ARRAY(char, b, mtGC); + FREE_C_HEAP_ARRAY(char, b); _buf_free_list_sz --; n--; }
--- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -154,11 +154,11 @@ RSHashTable::~RSHashTable() { if (_entries != NULL) { - FREE_C_HEAP_ARRAY(SparsePRTEntry, _entries, mtGC); + FREE_C_HEAP_ARRAY(SparsePRTEntry, _entries); _entries = NULL; } if (_buckets != NULL) { - FREE_C_HEAP_ARRAY(int, _buckets, mtGC); + FREE_C_HEAP_ARRAY(int, _buckets); _buckets = NULL; } }
--- a/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -106,13 +106,13 @@ _stats_arrays_length = _region_num; if (old_surv_rate != NULL) { - FREE_C_HEAP_ARRAY(double, old_surv_rate, mtGC); + FREE_C_HEAP_ARRAY(double, old_surv_rate); } if (old_accum_surv_rate_pred != NULL) { - FREE_C_HEAP_ARRAY(double, old_accum_surv_rate_pred, mtGC); + FREE_C_HEAP_ARRAY(double, old_accum_surv_rate_pred); } if (old_surv_rate_pred != NULL) { - FREE_C_HEAP_ARRAY(TruncatedSeq*, old_surv_rate_pred, mtGC); + FREE_C_HEAP_ARRAY(TruncatedSeq*, old_surv_rate_pred); } }
--- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -462,7 +462,7 @@ if (_lowest_non_clean[i] != NULL) { assert(n_chunks != _lowest_non_clean_chunk_size[i], "logical consequence"); - FREE_C_HEAP_ARRAY(CardPtr, _lowest_non_clean[i], mtGC); + FREE_C_HEAP_ARRAY(CardPtr, _lowest_non_clean[i]); _lowest_non_clean[i] = NULL; } // Now allocate a new one if necessary.
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1609,7 +1609,7 @@ // This can become a scaling bottleneck when there is work queue overflow coincident // with promotion failure. oopDesc* f = cur; - FREE_C_HEAP_ARRAY(oopDesc, f, mtGC); + FREE_C_HEAP_ARRAY(oopDesc, f); } else if (par_scan_state->should_be_partially_scanned(obj_to_push, cur)) { assert(arrayOop(cur)->length() == 0, "entire array remaining to be scanned"); obj_to_push = cur;
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -429,7 +429,7 @@ } tty->cr(); } - FREE_C_HEAP_ARRAY(uint, processor_assignment, mtGC); + FREE_C_HEAP_ARRAY(uint, processor_assignment); } reset_busy_workers(); set_unblocked(); @@ -458,11 +458,11 @@ GCTaskThread::destroy(thread(i)); set_thread(i, NULL); } - FREE_C_HEAP_ARRAY(GCTaskThread*, _thread, mtGC); + FREE_C_HEAP_ARRAY(GCTaskThread*, _thread); _thread = NULL; } if (_resource_flag != NULL) { - FREE_C_HEAP_ARRAY(bool, _resource_flag, mtGC); + FREE_C_HEAP_ARRAY(bool, _resource_flag); _resource_flag = NULL; } if (queue() != NULL) {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -58,7 +58,7 @@ GCTaskThread::~GCTaskThread() { if (_time_stamps != NULL) { - FREE_C_HEAP_ARRAY(GCTaskTimeStamp, _time_stamps, mtGC); + FREE_C_HEAP_ARRAY(GCTaskTimeStamp, _time_stamps); } }
--- a/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -53,7 +53,7 @@ ContiguousSpace* s, GenerationCounters* gc); ~CSpaceCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtInternal); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } virtual inline void update_capacity() {
--- a/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -50,7 +50,7 @@ CollectorCounters(const char* name, int ordinal); ~CollectorCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } inline PerfCounter* invocation_counter() const { return _invocations; }
--- a/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -55,7 +55,7 @@ GenerationCounters* gc, bool sampled=true); ~GSpaceCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } inline void update_capacity() {
--- a/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -69,7 +69,7 @@ size_t min_capacity, size_t max_capacity, VirtualSpace* v); ~GenerationCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } virtual void update_all();
--- a/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, 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 @@ -54,7 +54,7 @@ size_t initial_capacity, GenerationCounters* gc); ~HSpaceCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } inline void update_capacity(size_t v) {
--- a/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -276,7 +276,7 @@ } } - FREE_C_HEAP_ARRAY(int, lgrp_ids, mtGC); + FREE_C_HEAP_ARRAY(int, lgrp_ids); if (changed) { for (JavaThread *thread = Threads::first(); thread; thread = thread->next()) {
--- a/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -56,7 +56,7 @@ MutableSpace* m, GenerationCounters* gc); ~SpaceCounters() { - if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space, mtGC); + if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } inline void update_capacity() {
--- a/hotspot/src/share/vm/interpreter/oopMapCache.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/interpreter/oopMapCache.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -334,7 +334,7 @@ if (mask_size() > small_mask_limit && _bit_mask[0] != 0) { assert(!Thread::current()->resource_area()->contains((void*)_bit_mask[0]), "This bit mask should not be in the resource area"); - FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0], mtClass); + FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0]); debug_only(_bit_mask[0] = 0;) } } @@ -492,7 +492,7 @@ flush(); // Deallocate array NOT_PRODUCT(_total_memory_usage -= sizeof(OopMapCache) + (sizeof(OopMapCacheEntry) * _size);) - FREE_C_HEAP_ARRAY(OopMapCacheEntry, _array, mtClass); + FREE_C_HEAP_ARRAY(OopMapCacheEntry, _array); } OopMapCacheEntry* OopMapCache::entry_at(int i) const { @@ -603,5 +603,5 @@ tmp->initialize(); tmp->fill(method, bci); entry->resource_copy(tmp); - FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp, mtInternal); + FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp); }
--- a/hotspot/src/share/vm/memory/allocation.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/allocation.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -297,7 +297,7 @@ // to avoid deadlock with NMT while(cur != NULL) { next = cur->next(); - os::free(cur, mtChunk); + os::free(cur); cur = next; } } @@ -385,7 +385,7 @@ case Chunk::medium_size: ChunkPool::medium_pool()->free(c); break; case Chunk::init_size: ChunkPool::small_pool()->free(c); break; case Chunk::tiny_size: ChunkPool::tiny_pool()->free(c); break; - default: os::free(c, mtChunk); + default: os::free(c); } }
--- a/hotspot/src/share/vm/memory/allocation.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/allocation.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -101,7 +101,7 @@ // NEW_RESOURCE_OBJ(type) // NEW_C_HEAP_ARRAY(type, size) // NEW_C_HEAP_OBJ(type, memflags) -// FREE_C_HEAP_ARRAY(type, old, memflags) +// FREE_C_HEAP_ARRAY(type, old) // FREE_C_HEAP_OBJ(objname, type, memflags) // char* AllocateHeap(size_t size, const char* name); // void FreeHeap(void* p); @@ -669,8 +669,8 @@ #define REALLOC_C_HEAP_ARRAY_RETURN_NULL(type, old, size, memflags)\ (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), memflags, AllocFailStrategy::RETURN_NULL)) -#define FREE_C_HEAP_ARRAY(type, old, memflags) \ - FreeHeap((char*)(old), memflags) +#define FREE_C_HEAP_ARRAY(type, old) \ + FreeHeap((char*)(old)) // allocate type in heap without calling ctor #define NEW_C_HEAP_OBJ(type, memflags)\ @@ -680,8 +680,8 @@ NEW_C_HEAP_ARRAY_RETURN_NULL(type, 1, memflags) // deallocate obj of type in heap without calling dtor -#define FREE_C_HEAP_OBJ(objname, memflags)\ - FreeHeap((char*)objname, memflags); +#define FREE_C_HEAP_OBJ(objname)\ + FreeHeap((char*)objname); // for statistics #ifndef PRODUCT
--- a/hotspot/src/share/vm/memory/allocation.inline.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/allocation.inline.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -79,11 +79,11 @@ return p; } -inline void FreeHeap(void* p, MEMFLAGS memflags = mtInternal) { +inline void FreeHeap(void* p) { #ifdef ASSERT if (PrintMallocFree) trace_heap_free(p); #endif - os::free(p, memflags); + os::free(p); } @@ -136,11 +136,11 @@ } template <MEMFLAGS F> void CHeapObj<F>::operator delete(void* p){ - FreeHeap(p, F); + FreeHeap(p); } template <MEMFLAGS F> void CHeapObj<F>::operator delete [](void* p){ - FreeHeap(p, F); + FreeHeap(p); } template <class E, MEMFLAGS F> @@ -199,7 +199,7 @@ void ArrayAllocator<E, F>::free() { if (_addr != NULL) { if (_use_malloc) { - FreeHeap(_addr, F); + FreeHeap(_addr); } else { os::release_memory(_addr, _size); }
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -172,19 +172,19 @@ _committed = NULL; } if (_lowest_non_clean) { - FREE_C_HEAP_ARRAY(CardArr, _lowest_non_clean, mtGC); + FREE_C_HEAP_ARRAY(CardArr, _lowest_non_clean); _lowest_non_clean = NULL; } if (_lowest_non_clean_chunk_size) { - FREE_C_HEAP_ARRAY(size_t, _lowest_non_clean_chunk_size, mtGC); + FREE_C_HEAP_ARRAY(size_t, _lowest_non_clean_chunk_size); _lowest_non_clean_chunk_size = NULL; } if (_lowest_non_clean_base_chunk_index) { - FREE_C_HEAP_ARRAY(uintptr_t, _lowest_non_clean_base_chunk_index, mtGC); + FREE_C_HEAP_ARRAY(uintptr_t, _lowest_non_clean_base_chunk_index); _lowest_non_clean_base_chunk_index = NULL; } if (_last_LNC_resizing_collection) { - FREE_C_HEAP_ARRAY(int, _last_LNC_resizing_collection, mtGC); + FREE_C_HEAP_ARRAY(int, _last_LNC_resizing_collection); _last_LNC_resizing_collection = NULL; } }
--- a/hotspot/src/share/vm/memory/cardTableRS.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/cardTableRS.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -73,7 +73,7 @@ _ct_bs = NULL; } if (_last_cur_val_in_gen) { - FREE_C_HEAP_ARRAY(jbyte, _last_cur_val_in_gen, mtInternal); + FREE_C_HEAP_ARRAY(jbyte, _last_cur_val_in_gen); } }
--- a/hotspot/src/share/vm/memory/filemap.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/filemap.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -326,7 +326,7 @@ n = os::read(fd, _paths_misc_info, (unsigned int)info_size); if (n != info_size) { fail_continue("Unable to read the shared path info header."); - FREE_C_HEAP_ARRAY(char, _paths_misc_info, mtClass); + FREE_C_HEAP_ARRAY(char, _paths_misc_info); _paths_misc_info = NULL; return false; } @@ -709,7 +709,7 @@ } if (_paths_misc_info != NULL) { - FREE_C_HEAP_ARRAY(char, _paths_misc_info, mtClass); + FREE_C_HEAP_ARRAY(char, _paths_misc_info); _paths_misc_info = NULL; } return status;
--- a/hotspot/src/share/vm/memory/heapInspection.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/heapInspection.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -153,7 +153,7 @@ for (int index = 0; index < _size; index++) { _buckets[index].empty(); } - FREE_C_HEAP_ARRAY(KlassInfoBucket, _buckets, mtInternal); + FREE_C_HEAP_ARRAY(KlassInfoBucket, _buckets); _size = 0; } }
--- a/hotspot/src/share/vm/memory/memRegion.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/memory/memRegion.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -112,10 +112,10 @@ AllocFailStrategy::RETURN_NULL); } void MemRegion::operator delete(void* p) { - FreeHeap(p, mtGC); + FreeHeap(p); } void MemRegion::operator delete [](void* p) { - FreeHeap(p, mtGC); + FreeHeap(p); }
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1365,7 +1365,7 @@ cl->do_field(&fd); } } - FREE_C_HEAP_ARRAY(int, fields_sorted, mtClass); + FREE_C_HEAP_ARRAY(int, fields_sorted); } @@ -2473,7 +2473,7 @@ // deallocate the cached class file if (_cached_class_file != NULL) { - os::free(_cached_class_file, mtClass); + os::free(_cached_class_file); _cached_class_file = NULL; } @@ -2482,7 +2482,7 @@ // unreference array name derived from this class name (arrays of an unloaded // class can't be referenced anymore). if (_array_name != NULL) _array_name->decrement_refcount(); - if (_source_debug_extension != NULL) FREE_C_HEAP_ARRAY(char, _source_debug_extension, mtClass); + if (_source_debug_extension != NULL) FREE_C_HEAP_ARRAY(char, _source_debug_extension); assert(_total_instanceKlass_count >= 1, "Sanity check"); Atomic::dec(&_total_instanceKlass_count);
--- a/hotspot/src/share/vm/oops/method.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/oops/method.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1757,7 +1757,7 @@ JNIMethodBlockNode(int num_methods = min_block_size); - ~JNIMethodBlockNode() { FREE_C_HEAP_ARRAY(Method*, _methods, mtInternal); } + ~JNIMethodBlockNode() { FREE_C_HEAP_ARRAY(Method*, _methods); } void ensure_methods(int num_addl_methods) { if (_top < _number_of_methods) {
--- a/hotspot/src/share/vm/prims/jniCheck.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/jniCheck.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1554,7 +1554,7 @@ } // Avoiding call to UNCHECKED()->ReleaseStringUTFChars() since that will fire unexpected dtrace probes // Note that the dtrace arguments for the allocated memory will not match up with this solution. - FreeHeap((char*)result, mtInternal); + FreeHeap((char*)result); } functionExit(thr); return new_result;
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, 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 @@ -68,11 +68,11 @@ ~JvmtiConstantPoolReconstituter() { if (_symmap != NULL) { - os::free(_symmap, mtClass); + os::free(_symmap); _symmap = NULL; } if (_classmap != NULL) { - os::free(_classmap, mtClass); + os::free(_classmap); _classmap = NULL; } }
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -192,7 +192,7 @@ jvmtiError deallocate(unsigned char* mem) { if (mem != NULL) { - os::free(mem, mtInternal); + os::free(mem); } return JVMTI_ERROR_NONE; }
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -727,7 +727,7 @@ JvmtiCodeBlobEvents::build_jvmti_addr_location_map(nm, &_map, &_map_length); } ~JvmtiCompiledMethodLoadEventMark() { - FREE_C_HEAP_ARRAY(jvmtiAddrLocationMap, _map, mtInternal); + FREE_C_HEAP_ARRAY(jvmtiAddrLocationMap, _map); } jint code_size() { return _code_size; }
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -88,7 +88,7 @@ void GrowableCache::recache() { int len = _elements->length(); - FREE_C_HEAP_ARRAY(address, _cache, mtInternal); + FREE_C_HEAP_ARRAY(address, _cache); _cache = NEW_C_HEAP_ARRAY(address,len+1, mtInternal); for (int i=0; i<len; i++) { @@ -132,7 +132,7 @@ GrowableCache::~GrowableCache() { clear(); delete _elements; - FREE_C_HEAP_ARRAY(address, _cache, mtInternal); + FREE_C_HEAP_ARRAY(address, _cache); } void GrowableCache::initialize(void *this_obj, void listener_fun(void *, address*) ) {
--- a/hotspot/src/share/vm/prims/unsafe.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/unsafe.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -898,10 +898,10 @@ result = JVM_DefineClass(env, utfName, loader, body, length, pd); if (utfName && utfName != buf) - FREE_C_HEAP_ARRAY(char, utfName, mtInternal); + FREE_C_HEAP_ARRAY(char, utfName); free_body: - FREE_C_HEAP_ARRAY(jbyte, body, mtInternal); + FREE_C_HEAP_ARRAY(jbyte, body); return result; } } @@ -1086,7 +1086,7 @@ // try/finally clause: if (temp_alloc != NULL) { - FREE_C_HEAP_ARRAY(HeapWord, temp_alloc, mtInternal); + FREE_C_HEAP_ARRAY(HeapWord, temp_alloc); } // The anonymous class loader data has been artificially been kept alive to
--- a/hotspot/src/share/vm/prims/whitebox.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/prims/whitebox.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -328,7 +328,7 @@ // Free the memory allocated by NMTAllocTest WB_ENTRY(void, WB_NMTFree(JNIEnv* env, jobject o, jlong mem)) - os::free((void*)(uintptr_t)mem, mtTest); + os::free((void*)(uintptr_t)mem); WB_END WB_ENTRY(jlong, WB_NMTReserveMemory(JNIEnv* env, jobject o, jlong size)) @@ -754,7 +754,7 @@ env->ReleaseStringUTFChars(value, ccstrValue); } if (needFree) { - FREE_C_HEAP_ARRAY(char, ccstrResult, mtInternal); + FREE_C_HEAP_ARRAY(char, ccstrResult); } WB_END
--- a/hotspot/src/share/vm/runtime/arguments.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/arguments.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -437,7 +437,7 @@ inline void SysClassPath::reset_item_at(int index) { assert(index < _scp_nitems && index != _scp_base, "just checking"); if (_items[index] != NULL) { - FREE_C_HEAP_ARRAY(char, _items[index], mtInternal); + FREE_C_HEAP_ARRAY(char, _items[index]); _items[index] = NULL; } } @@ -473,7 +473,7 @@ memcpy(dirpath, path, tmp_end - path); dirpath[tmp_end - path] = '\0'; expanded_path = add_jars_to_path(expanded_path, dirpath); - FREE_C_HEAP_ARRAY(char, dirpath, mtInternal); + FREE_C_HEAP_ARRAY(char, dirpath); path = tmp_end + 1; } } @@ -540,7 +540,7 @@ cp_tmp += str_len; *cp_tmp = separator; memcpy(++cp_tmp, path, old_len + 1); // copy the trailing null - FREE_C_HEAP_ARRAY(char, path, mtInternal); + FREE_C_HEAP_ARRAY(char, path); } else { cp = REALLOC_C_HEAP_ARRAY(char, path, len, mtInternal); char* cp_tmp = cp + old_len; @@ -575,10 +575,10 @@ char* jarpath = NEW_C_HEAP_ARRAY(char, directory_len + 2 + strlen(name), mtInternal); sprintf(jarpath, "%s%s%s", directory, dir_sep, name); path = add_to_path(path, jarpath, false); - FREE_C_HEAP_ARRAY(char, jarpath, mtInternal); + FREE_C_HEAP_ARRAY(char, jarpath); } } - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); os::closedir(dir); return path; } @@ -713,7 +713,7 @@ static bool set_string_flag(char* name, const char* value, Flag::Flags origin) { if (!CommandLineFlags::ccstrAtPut(name, &value, origin)) return false; // Contract: CommandLineFlags always returns a pointer that needs freeing. - FREE_C_HEAP_ARRAY(char, value, mtInternal); + FREE_C_HEAP_ARRAY(char, value); return true; } @@ -737,10 +737,10 @@ } (void) CommandLineFlags::ccstrAtPut(name, &value, origin); // CommandLineFlags always returns a pointer that needs freeing. - FREE_C_HEAP_ARRAY(char, value, mtInternal); + FREE_C_HEAP_ARRAY(char, value); if (free_this_too != NULL) { // CommandLineFlags made its own copy, so I must delete my own temp. buffer. - FREE_C_HEAP_ARRAY(char, free_this_too, mtInternal); + FREE_C_HEAP_ARRAY(char, free_this_too); } return true; }
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -82,9 +82,9 @@ Deoptimization::UnrollBlock::~UnrollBlock() { - FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes, mtCompiler); - FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs, mtCompiler); - FREE_C_HEAP_ARRAY(intptr_t, _register_block, mtCompiler); + FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes); + FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs); + FREE_C_HEAP_ARRAY(intptr_t, _register_block); }
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -66,7 +66,7 @@ _nmethods[i]->make_not_entrant(); _nmethods[i]->method()->clear_code(); } - FREE_C_HEAP_ARRAY(nmethod*, _nmethods, mtInternal); + FREE_C_HEAP_ARRAY(nmethod*, _nmethods); _nmethods = NULL; _count = 0; }
--- a/hotspot/src/share/vm/runtime/fprofiler.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/fprofiler.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -936,7 +936,7 @@ FlatProfiler::interval_reset(); } - FREE_C_HEAP_ARRAY(JavaThread *, threadsList, mtInternal); + FREE_C_HEAP_ARRAY(JavaThread *, threadsList); } else { // Couldn't get the threads lock, just record that rather than blocking FlatProfiler::threads_lock_ticks += 1;
--- a/hotspot/src/share/vm/runtime/globals.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/globals.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -840,7 +840,7 @@ faddr->set_ccstr(new_value); if (!faddr->is_default() && old_value != NULL) { // Prior value is heap allocated so free it. - FREE_C_HEAP_ARRAY(char, old_value, mtInternal); + FREE_C_HEAP_ARRAY(char, old_value); } faddr->set_origin(origin); } @@ -874,7 +874,7 @@ } } out->cr(); - FREE_C_HEAP_ARRAY(Flag*, array, mtInternal); + FREE_C_HEAP_ARRAY(Flag*, array); } #ifndef PRODUCT @@ -908,5 +908,5 @@ array[i]->print_on(out, withComments); } } - FREE_C_HEAP_ARRAY(Flag*, array, mtInternal); + FREE_C_HEAP_ARRAY(Flag*, array); }
--- a/hotspot/src/share/vm/runtime/handles.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/handles.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -179,11 +179,11 @@ } void HandleMark::operator delete(void* p) { - FreeHeap(p, mtThread); + FreeHeap(p); } void HandleMark::operator delete[](void* p) { - FreeHeap(p, mtThread); + FreeHeap(p); } #ifdef ASSERT
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -207,7 +207,7 @@ return operator new (size); } void operator delete(void* p) { - FreeHeap(p, mtInternal); + FreeHeap(p); } void operator delete[] (void *p) { operator delete(p);
--- a/hotspot/src/share/vm/runtime/os.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/os.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -473,7 +473,7 @@ break; } entryName = dll_lookup(handle, agent_function_name); - FREE_C_HEAP_ARRAY(char, agent_function_name, mtThread); + FREE_C_HEAP_ARRAY(char, agent_function_name); if (entryName != NULL) { break; } @@ -689,7 +689,7 @@ } -void os::free(void *memblock, MEMFLAGS memflags) { +void os::free(void *memblock) { NOT_PRODUCT(inc_stat_counter(&num_frees, 1)); #ifdef ASSERT if (memblock == NULL) return; @@ -1211,7 +1211,7 @@ path_len = new_len; } - FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + FREE_C_HEAP_ARRAY(char, dbuf); os::closedir(dir); return path; @@ -1236,7 +1236,7 @@ if (rt_jar == NULL) return false; struct stat st; bool has_rt_jar = (os::stat(rt_jar, &st) == 0); - FREE_C_HEAP_ARRAY(char, rt_jar, mtInternal); + FREE_C_HEAP_ARRAY(char, rt_jar); if (has_rt_jar) { // Any modification to the JAR-file list, for the boot classpath must be @@ -1320,7 +1320,7 @@ opath[i] = s; p += len + 1; } - FREE_C_HEAP_ARRAY(char, inpath, mtInternal); + FREE_C_HEAP_ARRAY(char, inpath); *n = count; return opath; }
--- a/hotspot/src/share/vm/runtime/os.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/os.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -663,7 +663,7 @@ static void* realloc (void *memblock, size_t size, MEMFLAGS flag, const NativeCallStack& stack); static void* realloc (void *memblock, size_t size, MEMFLAGS flag); - static void free (void *memblock, MEMFLAGS flags = mtNone); + static void free (void *memblock); static bool check_heap(bool force = false); // verify C heap integrity static char* strdup(const char *, MEMFLAGS flags = mtInternal); // Like strdup // Like strdup, but exit VM when strdup() returns NULL
--- a/hotspot/src/share/vm/runtime/perfData.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/perfData.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -113,10 +113,10 @@ PerfData::~PerfData() { if (_name != NULL) { - FREE_C_HEAP_ARRAY(char, _name, mtInternal); + FREE_C_HEAP_ARRAY(char, _name); } if (is_on_c_heap()) { - FREE_C_HEAP_ARRAY(PerfDataEntry, _pdep, mtInternal); + FREE_C_HEAP_ARRAY(PerfDataEntry, _pdep); } }
--- a/hotspot/src/share/vm/runtime/perfMemory.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/perfMemory.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -250,7 +250,7 @@ dest_file = NEW_C_HEAP_ARRAY(char, JVM_MAXPATHLEN, mtInternal); if(!Arguments::copy_expand_pid(PerfDataSaveFile, strlen(PerfDataSaveFile), dest_file, JVM_MAXPATHLEN)) { - FREE_C_HEAP_ARRAY(char, dest_file, mtInternal); + FREE_C_HEAP_ARRAY(char, dest_file); if (PrintMiscellaneous && Verbose) { warning("Invalid performance data file path name specified, "\ "fall back to a default name");
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -2084,7 +2084,7 @@ ~AdapterFingerPrint() { if (_length > 0) { - FREE_C_HEAP_ARRAY(int, _value._fingerprint, mtCode); + FREE_C_HEAP_ARRAY(int, _value._fingerprint); } } @@ -2491,7 +2491,7 @@ void AdapterHandlerEntry::deallocate() { delete _fingerprint; #ifdef ASSERT - if (_saved_code) FREE_C_HEAP_ARRAY(unsigned char, _saved_code, mtCode); + if (_saved_code) FREE_C_HEAP_ARRAY(unsigned char, _saved_code); #endif } @@ -2902,7 +2902,7 @@ JRT_END JRT_LEAF(void, SharedRuntime::OSR_migration_end( intptr_t* buf) ) - FREE_C_HEAP_ARRAY(intptr_t, buf, mtCode); + FREE_C_HEAP_ARRAY(intptr_t, buf); JRT_END bool AdapterHandlerLibrary::contains(CodeBlob* b) {
--- a/hotspot/src/share/vm/runtime/thread.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/thread.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -171,9 +171,9 @@ void Thread::operator delete(void* p) { if (UseBiasedLocking) { void* real_malloc_addr = ((Thread*) p)->_real_malloc_address; - FreeHeap(real_malloc_addr, mtThread); + FreeHeap(real_malloc_addr); } else { - FreeHeap(p, mtThread); + FreeHeap(p); } } @@ -1146,7 +1146,7 @@ NamedThread::~NamedThread() { if (_name != NULL) { - FREE_C_HEAP_ARRAY(char, _name, mtThread); + FREE_C_HEAP_ARRAY(char, _name); _name = NULL; } } @@ -2998,7 +2998,7 @@ void JavaThread::popframe_free_preserved_args() { assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice"); - FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args, mtThread); + FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args); _popframe_preserved_args = NULL; _popframe_preserved_args_size = 0; } @@ -3608,7 +3608,7 @@ jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); // If we can't find the agent, exit. vm_exit_during_initialization(buf, NULL); - FREE_C_HEAP_ARRAY(char, buf, mtThread); + FREE_C_HEAP_ARRAY(char, buf); } } else { // Try to load the agent from the standard dll directory @@ -3628,7 +3628,7 @@ jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); // If we can't find the agent, exit. vm_exit_during_initialization(buf, NULL); - FREE_C_HEAP_ARRAY(char, buf, mtThread); + FREE_C_HEAP_ARRAY(char, buf); } } }
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -3269,10 +3269,10 @@ s[len-1] = '\0'; // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); if (recursiveFindType(origtypes, s, true) == 1) { - FREE_C_HEAP_ARRAY(char, s, mtInternal); + FREE_C_HEAP_ARRAY(char, s); return 1; } - FREE_C_HEAP_ARRAY(char, s, mtInternal); + FREE_C_HEAP_ARRAY(char, s); } const char* start = NULL; if (strstr(typeName, "GrowableArray<") == typeName) { @@ -3288,10 +3288,10 @@ s[len-1] = '\0'; // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); if (recursiveFindType(origtypes, s, true) == 1) { - FREE_C_HEAP_ARRAY(char, s, mtInternal); + FREE_C_HEAP_ARRAY(char, s); return 1; } - FREE_C_HEAP_ARRAY(char, s, mtInternal); + FREE_C_HEAP_ARRAY(char, s); } if (strstr(typeName, "const ") == typeName) { const char * s = typeName + strlen("const ");
--- a/hotspot/src/share/vm/services/attachListener.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/attachListener.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -348,7 +348,7 @@ } bool res = CommandLineFlags::ccstrAtPut((char*)name, &value, Flag::ATTACH_ON_DEMAND); if (res) { - FREE_C_HEAP_ARRAY(char, value, mtInternal); + FREE_C_HEAP_ARRAY(char, value); } else { out->print_cr("setting flag %s failed", name); }
--- a/hotspot/src/share/vm/services/diagnosticArgument.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/diagnosticArgument.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, 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 @@ -174,7 +174,7 @@ template <> void DCmdArgument<char*>::destroy_value() { if (_value != NULL) { - FREE_C_HEAP_ARRAY(char, _value, mtInternal); + FREE_C_HEAP_ARRAY(char, _value); set_value(NULL); } }
--- a/hotspot/src/share/vm/services/diagnosticArgument.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/diagnosticArgument.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, 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 @@ -53,7 +53,7 @@ ~StringArrayArgument() { for (int i=0; i<_array->length(); i++) { if(_array->at(i) != NULL) { // Safety check - FREE_C_HEAP_ARRAY(char, _array->at(i), mtInternal); + FREE_C_HEAP_ARRAY(char, _array->at(i)); } } delete _array;
--- a/hotspot/src/share/vm/services/heapDumper.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/heapDumper.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1404,7 +1404,7 @@ for (int i=0; i < _num_threads; i++) { delete _stack_traces[i]; } - FREE_C_HEAP_ARRAY(ThreadStackTrace*, _stack_traces, mtInternal); + FREE_C_HEAP_ARRAY(ThreadStackTrace*, _stack_traces); } delete _klass_map; }
--- a/hotspot/src/share/vm/services/management.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/management.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1744,7 +1744,7 @@ ccstr svalue = java_lang_String::as_utf8_string(str); succeed = CommandLineFlags::ccstrAtPut(name, &svalue, Flag::MANAGEMENT); if (succeed) { - FREE_C_HEAP_ARRAY(char, svalue, mtInternal); + FREE_C_HEAP_ARRAY(char, svalue); } } assert(succeed, "Setting flag should succeed"); @@ -1819,7 +1819,7 @@ for (int i = 0; i < _count; i++) { os::free(_names_chars[i]); } - FREE_C_HEAP_ARRAY(char *, _names_chars, mtInternal); + FREE_C_HEAP_ARRAY(char *, _names_chars); } // Fills names with VM internal thread names and times with the corresponding
--- a/hotspot/src/share/vm/services/memoryManager.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/services/memoryManager.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -171,8 +171,8 @@ } GCStatInfo::~GCStatInfo() { - FREE_C_HEAP_ARRAY(MemoryUsage*, _before_gc_usage_array, mtInternal); - FREE_C_HEAP_ARRAY(MemoryUsage*, _after_gc_usage_array, mtInternal); + FREE_C_HEAP_ARRAY(MemoryUsage*, _before_gc_usage_array); + FREE_C_HEAP_ARRAY(MemoryUsage*, _after_gc_usage_array); } void GCStatInfo::set_gc_usage(int pool_index, MemoryUsage usage, bool before_gc) {
--- a/hotspot/src/share/vm/utilities/array.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/array.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, 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 @@ -66,7 +66,7 @@ // allocate and initialize new data section void* data = NEW_C_HEAP_ARRAY(char*, esize * size, F); memcpy(data, _data, esize * length()); - FREE_C_HEAP_ARRAY(char*, _data, F); + FREE_C_HEAP_ARRAY(char*, _data); _data = data; }
--- a/hotspot/src/share/vm/utilities/bitMap.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/bitMap.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -468,7 +468,7 @@ (intptr_t) NULL_WORD); if (res != NULL_WORD) { guarantee( _pop_count_table == (void*) res, "invariant" ); - FREE_C_HEAP_ARRAY(idx_t, table, mtInternal); + FREE_C_HEAP_ARRAY(idx_t, table); } } }
--- a/hotspot/src/share/vm/utilities/hashtable.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/hashtable.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -149,7 +149,7 @@ // allocated by os::malloc if (!UseSharedSpaces || !FileMapInfo::current_info()->is_in_shared_space(_buckets)) { - FREE_C_HEAP_ARRAY(HashtableBucket, _buckets, F); + FREE_C_HEAP_ARRAY(HashtableBucket, _buckets); } _buckets = NULL; }
--- a/hotspot/src/share/vm/utilities/numberSeq.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/numberSeq.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -139,7 +139,7 @@ } TruncatedSeq::~TruncatedSeq() { - FREE_C_HEAP_ARRAY(double, _sequence, mtGC); + FREE_C_HEAP_ARRAY(double, _sequence); } void TruncatedSeq::add(double val) {
--- a/hotspot/src/share/vm/utilities/ostream.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/ostream.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -497,37 +497,37 @@ jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test.log", tms); o_result = make_log_name_internal("test.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); // test-%t-%p.log jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test-%s-pid%u.log", tms, pid); o_result = make_log_name_internal("test-%t-%p.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test-%%t-%%p.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); // test-%t%p.log jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test-%spid%u.log", tms, pid); o_result = make_log_name_internal("test-%t%p.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test-%%t%%p.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); // %p%t.log jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "pid%u%s.log", pid, tms); o_result = make_log_name_internal("%p%t.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%p%%t.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); // %p-test.log jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "pid%u-test.log", pid); o_result = make_log_name_internal("%p-test.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%p-test.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); // %t.log jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "%s.log", tms); o_result = make_log_name_internal("%t.log", NULL, pid, tms); assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%t.log\", NULL)"); - FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + FREE_C_HEAP_ARRAY(char, o_result); } #endif // PRODUCT @@ -626,7 +626,7 @@ _file = NULL; } if (_file_name != NULL) { - FREE_C_HEAP_ARRAY(char, _file_name, mtInternal); + FREE_C_HEAP_ARRAY(char, _file_name); _file_name = NULL; } } @@ -828,7 +828,7 @@ "Warning: Cannot open log file: %s\n", try_name); // Note: This feature is for maintainer use only. No need for L10N. jio_print(warnbuf); - FREE_C_HEAP_ARRAY(char, try_name, mtInternal); + FREE_C_HEAP_ARRAY(char, try_name); try_name = make_log_name(log_name, os::get_temp_directory()); jio_snprintf(warnbuf, sizeof(warnbuf), "Warning: Forcing option -XX:LogFile=%s\n", try_name); @@ -836,7 +836,7 @@ delete file; file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name); } - FREE_C_HEAP_ARRAY(char, try_name, mtInternal); + FREE_C_HEAP_ARRAY(char, try_name); if (file->is_open()) { _log_file = file; @@ -1120,7 +1120,7 @@ const char* list_name = make_log_name(DumpLoadedClassList, NULL); classlist_file = new(ResourceObj::C_HEAP, mtInternal) fileStream(list_name); - FREE_C_HEAP_ARRAY(char, list_name, mtInternal); + FREE_C_HEAP_ARRAY(char, list_name); } #endif @@ -1273,7 +1273,7 @@ bufferedStream::~bufferedStream() { if (!buffer_fixed) { - FREE_C_HEAP_ARRAY(char, buffer, mtInternal); + FREE_C_HEAP_ARRAY(char, buffer); } }
--- a/hotspot/src/share/vm/utilities/quickSort.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/quickSort.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -214,8 +214,8 @@ sort(test_array, length, test_even_odd_comparator, true); assert(compare_arrays(test_array, expected_array, length), "Sorting already sorted array changed order of elements - not idempotent"); - FREE_C_HEAP_ARRAY(int, test_array, mtInternal); - FREE_C_HEAP_ARRAY(int, expected_array, mtInternal); + FREE_C_HEAP_ARRAY(int, test_array); + FREE_C_HEAP_ARRAY(int, expected_array); } }
--- a/hotspot/src/share/vm/utilities/stack.inline.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/stack.inline.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, 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 @@ -145,7 +145,7 @@ template <class E, MEMFLAGS F> void Stack<E, F>::free(E* addr, size_t bytes) { - FREE_C_HEAP_ARRAY(char, (char*) addr, F); + FREE_C_HEAP_ARRAY(char, (char*) addr); } template <class E, MEMFLAGS F>
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp Mon Dec 01 12:16:15 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -427,7 +427,7 @@ template<class E, MEMFLAGS F, unsigned int N> GenericTaskQueue<E, F, N>::~GenericTaskQueue() { - FREE_C_HEAP_ARRAY(E, _elems, F); + FREE_C_HEAP_ARRAY(E, _elems); } // OverflowTaskQueue is a TaskQueue that also includes an overflow stack for
--- a/hotspot/src/share/vm/utilities/workgroup.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/workgroup.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -489,7 +489,7 @@ SubTasksDone::~SubTasksDone() { - if (_tasks != NULL) FREE_C_HEAP_ARRAY(jint, _tasks, mtInternal); + if (_tasks != NULL) FREE_C_HEAP_ARRAY(jint, _tasks); } // *** SequentialSubTasksDone @@ -560,7 +560,7 @@ FreeIdSet::~FreeIdSet() { _sets[_index] = NULL; - FREE_C_HEAP_ARRAY(int, _ids, mtInternal); + FREE_C_HEAP_ARRAY(int, _ids); } void FreeIdSet::set_safepoint(bool b) {
--- a/hotspot/src/share/vm/utilities/xmlstream.cpp Fri Nov 28 16:33:57 2014 +0100 +++ b/hotspot/src/share/vm/utilities/xmlstream.cpp Mon Dec 01 12:16:15 2014 -0500 @@ -58,7 +58,7 @@ #ifdef ASSERT xmlStream::~xmlStream() { - FREE_C_HEAP_ARRAY(char, _element_close_stack_low, mtInternal); + FREE_C_HEAP_ARRAY(char, _element_close_stack_low); } #endif @@ -162,7 +162,7 @@ _element_close_stack_high = new_high; _element_close_stack_low = new_low; _element_close_stack_ptr = new_ptr; - FREE_C_HEAP_ARRAY(char, old_low, mtInternal); + FREE_C_HEAP_ARRAY(char, old_low); push_ptr = new_ptr - (tag_len+1); } assert(push_ptr >= _element_close_stack_low, "in range");