src/share/vm/memory/allocation.inline.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hs25_8011661 Cdiff src/share/vm/memory/allocation.inline.hpp

src/share/vm/memory/allocation.inline.hpp

Print this page

        

*** 56,76 **** } char* p = (char*) os::malloc(size, flags, pc); #ifdef ASSERT if (PrintMallocFree) trace_heap_malloc(size, "AllocateHeap", p); #endif ! if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) vm_exit_out_of_memory(size, "AllocateHeap"); return p; } inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flags, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { char* p = (char*) os::realloc(old, size, flags, CURRENT_PC); #ifdef ASSERT if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p); #endif ! if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) vm_exit_out_of_memory(size, "ReallocateHeap"); return p; } inline void FreeHeap(void* p, MEMFLAGS memflags = mtInternal) { #ifdef ASSERT --- 56,80 ---- } char* p = (char*) os::malloc(size, flags, pc); #ifdef ASSERT if (PrintMallocFree) trace_heap_malloc(size, "AllocateHeap", p); #endif ! if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) { ! vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap"); ! } return p; } inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flags, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { char* p = (char*) os::realloc(old, size, flags, CURRENT_PC); #ifdef ASSERT if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p); #endif ! if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) { ! vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "ReallocateHeap"); ! } return p; } inline void FreeHeap(void* p, MEMFLAGS memflags = mtInternal) { #ifdef ASSERT
*** 128,143 **** int alignment = os::vm_allocation_granularity(); _size = align_size_up(_size, alignment); _addr = os::reserve_memory(_size, NULL, alignment); if (_addr == NULL) { ! vm_exit_out_of_memory(_size, "Allocator (reserve)"); } bool success = os::commit_memory(_addr, _size, false /* executable */); if (!success) { ! vm_exit_out_of_memory(_size, "Allocator (commit)"); } return (E*)_addr; } --- 132,147 ---- int alignment = os::vm_allocation_granularity(); _size = align_size_up(_size, alignment); _addr = os::reserve_memory(_size, NULL, alignment); if (_addr == NULL) { ! vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)"); } bool success = os::commit_memory(_addr, _size, false /* executable */); if (!success) { ! vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (commit)"); } return (E*)_addr; }
src/share/vm/memory/allocation.inline.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File