private:
static GarbageCollector * m_pManager ; ///< GC global instance
+ atomics::atomic<size_t> m_nLiberateThreshold; ///< Max size of retired pointer buffer to call \p scan()
+ const size_t m_nInitialThreadGuardCount; ///< Initial count of guards allocated for ThreadGC
+
details::guard_allocator<> m_GuardPool ; ///< Guard pool
details::retired_ptr_pool<> m_RetiredAllocator ; ///< Pool of free retired pointers
details::retired_ptr_buffer m_RetiredBuffer ; ///< Retired pointer buffer for liberating
- atomics::atomic<size_t> m_nLiberateThreshold; ///< Max size of retired pointer buffer to call \p scan()
- const size_t m_nInitialThreadGuardCount; ///< Initial count of guards allocated for ThreadGC
-
internal_stat m_stat ; ///< Internal statistics
bool m_bStatEnabled ; ///< Internal Statistics enabled
assert( m_idOwner.load( atomics::memory_order_relaxed ) == OS::c_NullThreadId );
assert( m_bFree.load(atomics::memory_order_relaxed) );
}
- //@endcond
+ //@endcond
};
atomics::atomic<hplist_node *> m_pListHead ; ///< Head of GC list
GarbageCollector::GarbageCollector( size_t nLiberateThreshold, size_t nInitialThreadGuardCount )
: m_nLiberateThreshold( nLiberateThreshold ? nLiberateThreshold : 1024 )
, m_nInitialThreadGuardCount( nInitialThreadGuardCount ? nInitialThreadGuardCount : 8 )
+ , m_bStatEnabled( false )
//, m_nInLiberate(0)
{
}
scan_type nScanType
)
: m_pListHead( nullptr )
- ,m_bStatEnabled( true )
+ ,m_bStatEnabled( false )
,m_nHazardPointerCount( nHazardPtrCount == 0 ? c_nHazardPointerPerThread : nHazardPtrCount )
,m_nMaxThreadCount( nMaxThreadCount == 0 ? c_nMaxThreadCount : nMaxThreadCount )
,m_nMaxRetiredPtrCount( nMaxRetiredPtrCount > c_nMaxRetireNodeCount ? nMaxRetiredPtrCount : c_nMaxRetireNodeCount )