8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"

Reviewed-by: coleenp, zgu, hseigel
This commit is contained in:
Calvin Cheung 2013-04-30 11:56:52 -07:00
parent a2f5f4ca1b
commit 0f7adcc3d9
31 changed files with 78 additions and 59 deletions

View file

@ -259,7 +259,7 @@ class ChunkPool: public CHeapObj<mtInternal> {
}
if (p == NULL) p = os::malloc(bytes, mtChunk, CURRENT_PC);
if (p == NULL)
vm_exit_out_of_memory(bytes, "ChunkPool::allocate");
vm_exit_out_of_memory(bytes, OOM_MALLOC_ERROR, "ChunkPool::allocate");
return p;
}
@ -371,7 +371,7 @@ void* Chunk::operator new(size_t requested_size, size_t length) {
default: {
void *p = os::malloc(bytes, mtChunk, CALLER_PC);
if (p == NULL)
vm_exit_out_of_memory(bytes, "Chunk::new");
vm_exit_out_of_memory(bytes, OOM_MALLOC_ERROR, "Chunk::new");
return p;
}
}
@ -531,7 +531,7 @@ size_t Arena::used() const {
}
void Arena::signal_out_of_memory(size_t sz, const char* whence) const {
vm_exit_out_of_memory(sz, whence);
vm_exit_out_of_memory(sz, OOM_MALLOC_ERROR, whence);
}
// Grow a new Chunk