Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/debug.cpp @ 10161:746b070f5022
8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
Reviewed-by: coleenp, zgu, hseigel
author | ccheung |
---|---|
date | Tue, 30 Apr 2013 11:56:52 -0700 |
parents | cc32ccaaf47f |
children | 6ce351ac7339 |
comparison
equal
deleted
inserted
replaced
10160:ed5a590835a4 | 10161:746b070f5022 |
---|---|
227 { | 227 { |
228 report_vm_error(file, line, "fatal error", message); | 228 report_vm_error(file, line, "fatal error", message); |
229 } | 229 } |
230 | 230 |
231 void report_vm_out_of_memory(const char* file, int line, size_t size, | 231 void report_vm_out_of_memory(const char* file, int line, size_t size, |
232 const char* message) { | 232 VMErrorType vm_err_type, const char* message) { |
233 if (Debugging) return; | 233 if (Debugging) return; |
234 | 234 |
235 Thread* thread = ThreadLocalStorage::get_thread_slow(); | 235 Thread* thread = ThreadLocalStorage::get_thread_slow(); |
236 VMError(thread, file, line, size, message).report_and_die(); | 236 VMError(thread, file, line, size, vm_err_type, message).report_and_die(); |
237 | 237 |
238 // The UseOSErrorReporting option in report_and_die() may allow a return | 238 // The UseOSErrorReporting option in report_and_die() may allow a return |
239 // to here. If so then we'll have to figure out how to handle it. | 239 // to here. If so then we'll have to figure out how to handle it. |
240 guarantee(false, "report_and_die() should not return here"); | 240 guarantee(false, "report_and_die() should not return here"); |
241 } | 241 } |
342 "%s%s# %s%s# %s%s# %s%s# %s%s# " | 342 "%s%s# %s%s# %s%s# %s%s# %s%s# " |
343 "%s%s# %s%s# %s%s# %s%s# %s", | 343 "%s%s# %s%s# %s%s# %s%s# %s", |
344 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, | 344 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
345 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, | 345 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
346 msg, eol, msg, eol, msg, eol, msg, eol, msg)); | 346 msg, eol, msg, eol, msg, eol, msg, eol, msg)); |
347 case 8: vm_exit_out_of_memory(num, "ChunkPool::allocate"); | 347 case 8: vm_exit_out_of_memory(num, OOM_MALLOC_ERROR, "ChunkPool::allocate"); |
348 case 9: ShouldNotCallThis(); | 348 case 9: ShouldNotCallThis(); |
349 case 10: ShouldNotReachHere(); | 349 case 10: ShouldNotReachHere(); |
350 case 11: Unimplemented(); | 350 case 11: Unimplemented(); |
351 // This is last because it does not generate an hs_err* file on Windows. | 351 // This is last because it does not generate an hs_err* file on Windows. |
352 case 12: os::signal_raise(SIGSEGV); | 352 case 12: os::signal_raise(SIGSEGV); |