--- old/src/share/vm/memory/allocation.hpp 2017-06-14 14:52:25.344465600 +0200 +++ new/src/share/vm/memory/allocation.hpp 2017-06-14 14:52:25.216461694 +0200 @@ -713,43 +713,43 @@ // to mapped memory for large allocations. By default ArrayAllocatorMallocLimit // is set so that we always use malloc except for Solaris where we set the // limit to get mapped memory. -template +template class ArrayAllocator : public AllStatic { private: static bool should_use_malloc(size_t length); - static E* allocate_malloc(size_t length); - static E* allocate_mmap(size_t length); + static E* allocate_malloc(size_t length, MEMFLAGS flags); + static E* allocate_mmap(size_t length, MEMFLAGS flags); static void free_malloc(E* addr, size_t length); static void free_mmap(E* addr, size_t length); public: - static E* allocate(size_t length); - static E* reallocate(E* old_addr, size_t old_length, size_t new_length); + static E* allocate(size_t length, MEMFLAGS flags); + static E* reallocate(E* old_addr, size_t old_length, size_t new_length, MEMFLAGS flags); static void free(E* addr, size_t length); }; // Uses mmaped memory for all allocations. All allocations are initially // zero-filled. No pre-touching. -template +template class MmapArrayAllocator : public AllStatic { private: static size_t size_for(size_t length); public: - static E* allocate_or_null(size_t length); - static E* allocate(size_t length); + static E* allocate_or_null(size_t length, MEMFLAGS flags); + static E* allocate(size_t length, MEMFLAGS flags); static void free(E* addr, size_t length); }; // Uses malloc:ed memory for all allocations. -template +template class MallocArrayAllocator : public AllStatic { public: static size_t size_for(size_t length); - static E* allocate(size_t length); + static E* allocate(size_t length, MEMFLAGS flags); static void free(E* addr, size_t length); };