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

@ -67,7 +67,7 @@ StubQueue::StubQueue(StubInterface* stub_interface, int buffer_size,
intptr_t size = round_to(buffer_size, 2*BytesPerWord);
BufferBlob* blob = BufferBlob::create(name, size);
if( blob == NULL) {
vm_exit_out_of_memory(size, err_msg("CodeCache: no room for %s", name));
vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, err_msg("CodeCache: no room for %s", name));
}
_stub_interface = stub_interface;
_buffer_size = blob->content_size();

View file

@ -60,7 +60,7 @@ void* VtableStub::operator new(size_t size, int code_size) {
const int bytes = chunk_factor * real_size + pd_code_alignment();
BufferBlob* blob = BufferBlob::create("vtable chunks", bytes);
if (blob == NULL) {
vm_exit_out_of_memory(bytes, "CodeCache: no room for vtable chunks");
vm_exit_out_of_memory(bytes, OOM_MALLOC_ERROR, "CodeCache: no room for vtable chunks");
}
_chunk = blob->content_begin();
_chunk_end = _chunk + bytes;