Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 14192:ff355e26c78d
8029524: Remove unsused method CollectedHeap::unsafe_max_alloc()
Reviewed-by: pliden, jmasa
author | brutisso |
---|---|
date | Mon, 16 Dec 2013 08:54:14 +0100 |
parents | 86e6d691f2e1 |
children | 893ce66f7473 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Dec 13 09:35:12 2013 -0800 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Dec 16 08:54:14 2013 +0100 @@ -2376,25 +2376,6 @@ return blk.result(); } -size_t G1CollectedHeap::unsafe_max_alloc() { - if (free_regions() > 0) return HeapRegion::GrainBytes; - // otherwise, is there space in the current allocation region? - - // We need to store the current allocation region in a local variable - // here. The problem is that this method doesn't take any locks and - // there may be other threads which overwrite the current allocation - // region field. attempt_allocation(), for example, sets it to NULL - // and this can happen *after* the NULL check here but before the call - // to free(), resulting in a SIGSEGV. Note that this doesn't appear - // to be a problem in the optimized build, since the two loads of the - // current allocation region field are optimized away. - HeapRegion* hr = _mutator_alloc_region.get(); - if (hr == NULL) { - return 0; - } - return hr->free(); -} - bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) { switch (cause) { case GCCause::_gc_locker: return GCLockerInvokesConcurrent;