hotspot/src/share/vm/memory/allocation.inline.hpp
changeset 46619 a3919f5e8d2b
parent 41176 ff9f64534cff
child 46625 edefffab74e2
equal deleted inserted replaced
46618:d503911aa948 46619:a3919f5e8d2b
   147 
   147 
   148 template <class E, MEMFLAGS F>
   148 template <class E, MEMFLAGS F>
   149 size_t MmapArrayAllocator<E, F>::size_for(size_t length) {
   149 size_t MmapArrayAllocator<E, F>::size_for(size_t length) {
   150   size_t size = length * sizeof(E);
   150   size_t size = length * sizeof(E);
   151   int alignment = os::vm_allocation_granularity();
   151   int alignment = os::vm_allocation_granularity();
   152   return align_size_up(size, alignment);
   152   return align_up(size, alignment);
   153 }
   153 }
   154 
   154 
   155 template <class E, MEMFLAGS F>
   155 template <class E, MEMFLAGS F>
   156 E* MmapArrayAllocator<E, F>::allocate_or_null(size_t length) {
   156 E* MmapArrayAllocator<E, F>::allocate_or_null(size_t length) {
   157   size_t size = size_for(length);
   157   size_t size = size_for(length);