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

changeset 7806
ed0067c67bd7
parent 7074
833b0f92429a
child 7994
04ff2f6cd0eb
equal deleted inserted replaced
7804:7a4abf4cbade 7806:ed0067c67bd7
60 if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) { 60 if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) {
61 vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap"); 61 vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap");
62 } 62 }
63 return p; 63 return p;
64 } 64 }
65
66 #ifdef __GNUC__
67 __attribute__((always_inline))
68 #endif
65 inline char* AllocateHeap(size_t size, MEMFLAGS flags, 69 inline char* AllocateHeap(size_t size, MEMFLAGS flags,
66 AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { 70 AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) {
67 return AllocateHeap(size, flags, CURRENT_PC, alloc_failmode); 71 return AllocateHeap(size, flags, CURRENT_PC, alloc_failmode);
68 } 72 }
69 73
74 #ifdef __GNUC__
75 __attribute__((always_inline))
76 #endif
70 inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flag, 77 inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flag,
71 AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { 78 AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) {
72 char* p = (char*) os::realloc(old, size, flag, CURRENT_PC); 79 char* p = (char*) os::realloc(old, size, flag, CURRENT_PC);
73 #ifdef ASSERT 80 #ifdef ASSERT
74 if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p); 81 if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p);

mercurial