Mercurial > hg > truffle
diff src/share/vm/utilities/debug.hpp @ 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 | be4d5c6c1f79 |
children | 836a62f43af9 59b052799158 |
line wrap: on
line diff
--- a/src/share/vm/utilities/debug.hpp Tue Apr 30 09:17:06 2013 -0400 +++ b/src/share/vm/utilities/debug.hpp Tue Apr 30 11:56:52 2013 -0700 @@ -174,9 +174,9 @@ } while (0) // out of memory -#define vm_exit_out_of_memory(size, msg) \ +#define vm_exit_out_of_memory(size, vm_err_type, msg) \ do { \ - report_vm_out_of_memory(__FILE__, __LINE__, size, msg); \ + report_vm_out_of_memory(__FILE__, __LINE__, size, vm_err_type, msg); \ BREAKPOINT; \ } while (0) @@ -204,12 +204,20 @@ BREAKPOINT; \ } while (0); + +// types of VM error - originally in vmError.hpp +enum VMErrorType { + INTERNAL_ERROR = 0xe0000000, + OOM_MALLOC_ERROR = 0xe0000001, + OOM_MMAP_ERROR = 0xe0000002 +}; + // error reporting helper functions void report_vm_error(const char* file, int line, const char* error_msg, const char* detail_msg = NULL); void report_fatal(const char* file, int line, const char* message); void report_vm_out_of_memory(const char* file, int line, size_t size, - const char* message); + VMErrorType vm_err_type, const char* message); void report_should_not_call(const char* file, int line); void report_should_not_reach_here(const char* file, int line); void report_unimplemented(const char* file, int line);