< prev index next >

src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp

Print this page
rev 49852 : imported patch 8191471-g1-retained-mutator-region

*** 34,43 **** --- 34,47 ---- _name, (message), _count, BOOL_TO_STR(_bot_updates), \ p2i(_alloc_region), _used_bytes_before); \ } while (0) + inline void G1AllocRegion::reset_alloc_region() { + _alloc_region = _dummy_region; + } + inline HeapWord* G1AllocRegion::allocate(HeapRegion* alloc_region, size_t word_size) { assert(alloc_region != NULL, "pre-condition"); if (!_bot_updates) {
*** 124,129 **** --- 128,146 ---- } trace("alloc forced failed", word_size, word_size); return NULL; } + inline HeapWord* MutatorAllocRegion::attempt_retained_allocation(size_t min_word_size, + size_t desired_word_size, + size_t* actual_word_size) { + if (_retained_alloc_region != NULL) { + HeapWord* result = par_allocate(_retained_alloc_region, min_word_size, desired_word_size, actual_word_size); + if (result != NULL) { + trace("alloc retained", min_word_size, desired_word_size, *actual_word_size, result); + return result; + } + } + return NULL; + } + #endif // SHARE_VM_GC_G1_G1ALLOCREGION_INLINE_HPP
< prev index next >