![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
25 static constexpr
unsigned poolgrow = 16384+
extra;
26 static constexpr
unsigned motherpoolgrow = poolgrow*32+
extra;
33 : m_chunksize(chunksize),
42 : m_chunksize(chunksize),
69 std::scoped_lock lock (
m_mutex);
71 char *
c =
reinterpret_cast<char*
>(
a);
91 std::scoped_lock lock (
m_mutex);
97 std::scoped_lock lock (
m_mutex);
100 l +=
a->getMemDishedOut();
117 char *
c =
a->acquire();
139 std::lower_bound(
m_areas.begin(),
m_areas.end(),
reinterpret_cast<void*
>(
c));
141 assert(
a&&
a->belongsInArea(
c)&&
"Trying to release chunk back to a mem-pool from which it was never acquired");
142 assert(
reinterpret_cast<char*
>(
a)<
c&&
c<
reinterpret_cast<char*
>(
a)+
m_growsize);
185 const unsigned nareasplusone(
m_areas.size()+1);
186 for (;
i<nareasplusone;++
i) {
191 const unsigned nareasminusone(nareasplusone-2);
192 if (
i<nareasminusone) {
194 for (
unsigned j=
i;j<nareasminusone;++j)
197 m_areas.resize(nareasminusone);
198 char *
c =
reinterpret_cast<char*
>(
a);
static LWPoolArea * create(unsigned chunksize, char *mem, unsigned length_of_mem, unsigned nchunks=UINT_MAX)
JetConstituentVector::iterator iterator
void freeArea(LWPoolArea *)
LWPoolArea * m_likelyNonEmptyArea
long long getMemDishedOut() const
LWPoolArea * findArea(char *)
long long getMemOwned() const
static void forceCleanupMotherPool()
unsigned m_nchunksPerArea
const unsigned m_growsize
static LWPool * getMotherPool()
std::vector< LWPoolArea * > m_areas
const unsigned m_chunksize
bool isMotherPool() const
LWPool(unsigned chunksize)
#define ATLAS_THREAD_SAFE
Define macros for attributes used to control the static checker.
LWPoolArea * m_likelyReleaseArea
static long long getMotherMemOwned()