src/share/vm/memory/allocation.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hs25_8011661 Cdiff src/share/vm/memory/allocation.cpp
src/share/vm/memory/allocation.cpp
Print this page
*** 257,267 ****
_num_used++;
p = get_first();
}
if (p == NULL) p = os::malloc(bytes, mtChunk, CURRENT_PC);
if (p == NULL)
! vm_exit_out_of_memory(bytes, "ChunkPool::allocate");
return p;
}
// Return a chunk to the pool
--- 257,267 ----
_num_used++;
p = get_first();
}
if (p == NULL) p = os::malloc(bytes, mtChunk, CURRENT_PC);
if (p == NULL)
! vm_exit_out_of_memory(bytes, OOM_MALLOC_ERROR, "ChunkPool::allocate");
return p;
}
// Return a chunk to the pool
*** 369,379 ****
case Chunk::medium_size: return ChunkPool::medium_pool()->allocate(bytes);
case Chunk::init_size: return ChunkPool::small_pool()->allocate(bytes);
default: {
void *p = os::malloc(bytes, mtChunk, CALLER_PC);
if (p == NULL)
! vm_exit_out_of_memory(bytes, "Chunk::new");
return p;
}
}
}
--- 369,379 ----
case Chunk::medium_size: return ChunkPool::medium_pool()->allocate(bytes);
case Chunk::init_size: return ChunkPool::small_pool()->allocate(bytes);
default: {
void *p = os::malloc(bytes, mtChunk, CALLER_PC);
if (p == NULL)
! vm_exit_out_of_memory(bytes, OOM_MALLOC_ERROR, "Chunk::new");
return p;
}
}
}
*** 529,539 ****
}
return sum; // Return total consumed space.
}
void Arena::signal_out_of_memory(size_t sz, const char* whence) const {
! vm_exit_out_of_memory(sz, whence);
}
// Grow a new Chunk
void* Arena::grow(size_t x, AllocFailType alloc_failmode) {
// Get minimal required size. Either real big, or even bigger for giant objs
--- 529,539 ----
}
return sum; // Return total consumed space.
}
void Arena::signal_out_of_memory(size_t sz, const char* whence) const {
! vm_exit_out_of_memory(sz, OOM_MALLOC_ERROR, whence);
}
// Grow a new Chunk
void* Arena::grow(size_t x, AllocFailType alloc_failmode) {
// Get minimal required size. Either real big, or even bigger for giant objs
src/share/vm/memory/allocation.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File