Mem Namespace Reference

Memory Management.

Classes

class  Allocator
 
class  AllocatorProxy
 
class  Meter
 
class  PoolMeter
 
class  PoolStats
 

Functions

void Init ()
 
void Stats (StoreEntry *)
 
void CleanIdlePools (void *unused)
 
void Report (std::ostream &)
 
void PoolReport (const PoolStats *, const PoolMeter *, std::ostream &)
 
void ZeroSensitiveMemory (void *dst, const size_t len)
 
size_t GlobalStats (PoolStats &)
 

Function Documentation

◆ CleanIdlePools()

void Mem::CleanIdlePools ( void *  unused)

◆ GlobalStats()

size_t Mem::GlobalStats ( PoolStats stats)

Fills a Mem::PoolStats with statistical data about overall usage for all pools.

Returns
Number of pools that have at least one object in use. Ie. number of dirty pools.

Definition at line 15 of file Stats.cc.

References MemPools::flushMeters(), MemPools::GetInstance(), MemPools::pools, Ping::stats, and TheMeter.

Referenced by DumpInfo(), GetInfo(), memClean(), Report(), and snmp_prfSysFn().

◆ Init()

void Mem::Init ( void  )

Then initialize all pools.

Starting with generic 2kB - 64kB buffr pools, then specific object types.
It does not hurt much to have a lot of pools since sizeof(MemPool) is small; someday we will figure out what to do with all the entries here that are never used or used only once; perhaps we should simply use malloc() for those? @?@

Definition at line 425 of file old_api.cc.

References GetPool(), MEM_16K_BUF, MEM_2K_BUF, MEM_32K_BUF, MEM_4K_BUF, MEM_64K_BUF, MEM_8K_BUF, MEM_DREAD_CTRL, MEM_DWRITE_Q, MEM_MD5_DIGEST, memDataInit(), Mgr::RegisterAction(), Mem::Allocator::setChunkSize(), SQUID_MD5_DIGEST_LENGTH, and Stats().

Referenced by commonInit(), TestUfs::commonInit(), fake_auth_setup(), TestHttp1Parser::globalSetup(), main(), SquidMain(), MyTestProgram::startup(), and TestSBuf::testSBufConstructDestructAfterMemInit().

◆ PoolReport()

◆ Report()

◆ Stats()

void Mem::Stats ( StoreEntry sentry)

◆ ZeroSensitiveMemory()

void Mem::ZeroSensitiveMemory ( void *  dst,
const size_t  len 
)
inline

zeros the given memory area while disallowing the compiler to skip (i.e. optimize away) this cleanup, unlike a regular call to std::memset() or alike

Definition at line 19 of file Sensitive.h.

References assert.

Referenced by nmasldap_get_password(), and nmasldap_get_simple_pwd().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors