@@ -351,9 +351,9 @@ oop HeapShared::archive_object(oop obj) {
351
351
log_error (cds, heap)(
352
352
" Cannot allocate space for object " PTR_FORMAT " in archived heap region" ,
353
353
p2i (obj));
354
- vm_direct_exit (- 1 ,
355
- err_msg ( " Out of memory. Please run with a larger Java heap, current MaxHeapSize = "
356
- SIZE_FORMAT " M " , MaxHeapSize/M) );
354
+ log_error (cds)( " Out of memory. Please run with a larger Java heap, current MaxHeapSize = "
355
+ SIZE_FORMAT " M " , MaxHeapSize/M);
356
+ os::_exit (- 1 );
357
357
}
358
358
return archived_oop;
359
359
}
@@ -1165,7 +1165,7 @@ oop HeapShared::archive_reachable_objects_from(int level,
1165
1165
// these objects that are referenced (directly or indirectly) by static fields.
1166
1166
ResourceMark rm;
1167
1167
log_error (cds, heap)(" Cannot archive object of class %s" , orig_obj->klass ()->external_name ());
1168
- vm_direct_exit (1 );
1168
+ os::_exit (1 );
1169
1169
}
1170
1170
1171
1171
// java.lang.Class instances cannot be included in an archived object sub-graph. We only support
@@ -1175,7 +1175,7 @@ oop HeapShared::archive_reachable_objects_from(int level,
1175
1175
// object that is referenced (directly or indirectly) by static fields.
1176
1176
if (java_lang_Class::is_instance (orig_obj)) {
1177
1177
log_error (cds, heap)(" (%d) Unknown java.lang.Class object is in the archived sub-graph" , level);
1178
- vm_direct_exit (1 );
1178
+ os::_exit (1 );
1179
1179
}
1180
1180
1181
1181
oop archived_obj = find_archived_heap_object (orig_obj);
@@ -1211,7 +1211,7 @@ oop HeapShared::archive_reachable_objects_from(int level,
1211
1211
// We don't know how to handle an object that has been archived, but some of its reachable
1212
1212
// objects cannot be archived. Bail out for now. We might need to fix this in the future if
1213
1213
// we have a real use case.
1214
- vm_direct_exit (1 );
1214
+ os::_exit (1 );
1215
1215
}
1216
1216
}
1217
1217
0 commit comments