< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page

        

*** 178,188 **** } size_t MetaspaceGC::dec_capacity_until_GC(size_t v) { assert_is_aligned(v, Metaspace::commit_alignment()); ! return Atomic::sub(v, &_capacity_until_GC); } void MetaspaceGC::initialize() { // Set the high-water mark to MaxMetapaceSize during VM initializaton since // we can't do a GC during initialization. --- 178,188 ---- } size_t MetaspaceGC::dec_capacity_until_GC(size_t v) { assert_is_aligned(v, Metaspace::commit_alignment()); ! return Atomic::sub(&_capacity_until_GC, v); } void MetaspaceGC::initialize() { // Set the high-water mark to MaxMetapaceSize during VM initializaton since // we can't do a GC during initialization.
*** 400,410 **** static void dec_stat_atomically(volatile size_t* pstat, size_t words) { const size_t size_now = *pstat; assert(size_now >= words, "About to decrement counter below zero " "(current value: " SIZE_FORMAT ", decrement value: " SIZE_FORMAT ".", size_now, words); ! Atomic::sub(words, pstat); } void MetaspaceUtils::dec_capacity(Metaspace::MetadataType mdtype, size_t words) { dec_stat_nonatomically(&_capacity_words[mdtype], words); } --- 400,410 ---- static void dec_stat_atomically(volatile size_t* pstat, size_t words) { const size_t size_now = *pstat; assert(size_now >= words, "About to decrement counter below zero " "(current value: " SIZE_FORMAT ", decrement value: " SIZE_FORMAT ".", size_now, words); ! Atomic::sub(pstat, words); } void MetaspaceUtils::dec_capacity(Metaspace::MetadataType mdtype, size_t words) { dec_stat_nonatomically(&_capacity_words[mdtype], words); }
< prev index next >