< prev index next >

src/hotspot/share/gc/epsilon/epsilonHeap.cpp

Print this page
rev 52077 : 8212005: Epsilon elastic TLAB sizing may cause misalignment
Reviewed-by: XXX

*** 116,125 **** --- 116,127 ---- assert(heap->kind() == CollectedHeap::Epsilon, "Not an Epsilon heap"); return (EpsilonHeap*)heap; } HeapWord* EpsilonHeap::allocate_work(size_t size) { + assert(is_object_aligned(size), "Allocation size should be aligned: " SIZE_FORMAT, size); + HeapWord* res = _space->par_allocate(size); while (res == NULL) { // Allocation failed, attempt expansion, and retry: MutexLockerEx ml(Heap_lock);
*** 166,175 **** --- 168,178 ---- used / M, used * 100.0 / max_capacity()); } } + assert(is_object_aligned(res), "Object should be aligned: " PTR_FORMAT, p2i(res)); return res; } HeapWord* EpsilonHeap::allocate_new_tlab(size_t min_size, size_t requested_size,
*** 209,218 **** --- 212,224 ---- } // Always honor boundaries size = MAX2(min_size, MIN2(_max_tlab_size, size)); + // Always honor alignment + size = align_up(size, MinObjAlignment); + if (log_is_enabled(Trace, gc)) { ResourceMark rm; log_trace(gc)("TLAB size for \"%s\" (Requested: " SIZE_FORMAT "K, Min: " SIZE_FORMAT "K, Max: " SIZE_FORMAT "K, Ergo: " SIZE_FORMAT "K) -> " SIZE_FORMAT "K", thread->name(),
< prev index next >