--- 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);