< prev index next >

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

Print this page

        

@@ -26,10 +26,11 @@
 #define SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP
 
 #include "runtime/atomic.inline.hpp"
 #include "runtime/os.hpp"
 #include "services/memTracker.hpp"
+#include "utilities/globalDefinitions.hpp"
 
 // Explicit C-heap memory management
 
 void trace_heap_malloc(size_t size, const char* name, void *p);
 void trace_heap_free(void *p);

@@ -61,22 +62,16 @@
     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,
+ALWAYSINLINE 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,
+ALWAYSINLINE 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);
   #endif
< prev index next >