< prev index next >

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

Print this page
rev 7340 : 8076212: AllocateHeap() and ReallocateHeap() should be inlined.
Summary: NMT with detail option reports incorrect caller address on Linux.
Reviewed-by: dholmes, coleenp

*** 60,74 **** --- 60,81 ---- if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) { vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap"); } return p; } + + #ifdef __GNUC__ + __attribute__((always_inline)) + #endif inline char* AllocateHeap(size_t size, MEMFLAGS flags, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { return AllocateHeap(size, flags, CURRENT_PC, alloc_failmode); } + #ifdef __GNUC__ + __attribute__((always_inline)) + #endif inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { char* p = (char*) os::realloc(old, size, flag, CURRENT_PC); #ifdef ASSERT if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p);
< prev index next >