mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8060074: os::free() takes MemoryTrackingLevel but doesn't need it
Cleaned up unused arguments in os::free and it's callers. Reviewed-by: lfoltan, coleenp, ctornqvi, dholmes
This commit is contained in:
parent
6c1cf6ba45
commit
91dbd4f088
91 changed files with 354 additions and 354 deletions
|
@ -497,37 +497,37 @@ void test_loggc_filename() {
|
|||
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 @@ gcLogFileStream::~gcLogFileStream() {
|
|||
_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 @@ void defaultStream::init_log() {
|
|||
"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 @@ void defaultStream::init_log() {
|
|||
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 @@ void ostream_init_log() {
|
|||
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 @@ char* bufferedStream::as_string() {
|
|||
|
||||
bufferedStream::~bufferedStream() {
|
||||
if (!buffer_fixed) {
|
||||
FREE_C_HEAP_ARRAY(char, buffer, mtInternal);
|
||||
FREE_C_HEAP_ARRAY(char, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue