--- old/src/os/bsd/vm/perfMemory_bsd.cpp 2014-11-18 07:32:59.303403000 -0800 +++ new/src/os/bsd/vm/perfMemory_bsd.cpp 2014-11-18 07:32:58.699914000 -0800 @@ -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);