< prev index next >
src/hotspot/share/compiler/compileTask.cpp
Print this page
@@ -70,10 +70,16 @@
task->set_code(NULL);
assert(!task->lock()->is_locked(), "Should not be locked when freed");
JNIHandles::destroy_global(task->_method_holder);
JNIHandles::destroy_global(task->_hot_method_holder);
+ if (task->_failure_reason_on_C_heap && task->_failure_reason != NULL) {
+ os::free((void*) task->_failure_reason);
+ }
+ task->_failure_reason = NULL;
+ task->_failure_reason_on_C_heap = false;
+
task->set_is_free(true);
task->set_next(_task_free_list);
_task_free_list = task;
}
}
@@ -108,10 +114,11 @@
_hot_method_holder = NULL;
_hot_count = hot_count;
_time_queued = 0; // tidy
_compile_reason = compile_reason;
_failure_reason = NULL;
+ _failure_reason_on_C_heap = false;
if (LogCompilation) {
_time_queued = os::elapsed_counter();
if (hot_method.not_null()) {
if (hot_method == method) {
< prev index next >