diff -r 3107be2ba9c6 -r 0e2e188ab887 hotspot/src/os/aix/vm/perfMemory_aix.cpp --- a/hotspot/src/os/aix/vm/perfMemory_aix.cpp Wed Jul 05 20:10:08 2017 +0200 +++ b/hotspot/src/os/aix/vm/perfMemory_aix.cpp Fri Dec 05 16:36:07 2014 -0800 @@ -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);