< prev index next >

src/hotspot/share/memory/arena.hpp

Print this page
rev 59103 : imported patch hotspot

*** 172,196 **** // Allocate with 'double' alignment. It is 8 bytes on sparc. // In other cases Amalloc_D() should be the same as Amalloc_4(). void* Amalloc_D(size_t x, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { assert( (x&(sizeof(char*)-1)) == 0, "misaligned size" ); debug_only(if (UseMallocOnly) return malloc(x);) - #if defined(SPARC) && !defined(_LP64) - #define DALIGN_M1 7 - size_t delta = (((size_t)_hwm + DALIGN_M1) & ~DALIGN_M1) - (size_t)_hwm; - x += delta; - #endif if (!check_for_overflow(x, "Arena::Amalloc_D", alloc_failmode)) return NULL; if (_hwm + x > _max) { return grow(x, alloc_failmode); // grow() returns a result aligned >= 8 bytes. } else { char *old = _hwm; _hwm += x; - #if defined(SPARC) && !defined(_LP64) - old += delta; // align to 8-bytes - #endif return old; } } // Fast delete in area. Common case is: NOP (except for storage reclaimed) --- 172,188 ----
< prev index next >