Go to the source code of this file.
Namespaces | |
namespace | Mem |
Memory Management. | |
Typedefs | |
typedef void | FREE(void *) |
Enumerations | |
enum | mem_type { MEM_NONE , MEM_2K_BUF , MEM_4K_BUF , MEM_8K_BUF , MEM_16K_BUF , MEM_32K_BUF , MEM_64K_BUF , MEM_DREAD_CTRL , MEM_DWRITE_Q , MEM_MD5_DIGEST , MEM_MAX } |
Types of memory pool which do not yet use MEMPROXY_CLASS() API. More... | |
Functions | |
void | Mem::Init () |
void | Mem::Stats (StoreEntry *) |
void | Mem::CleanIdlePools (void *unused) |
void | Mem::Report (std::ostream &) |
void | Mem::PoolReport (const PoolStats *, const PoolMeter *, std::ostream &) |
void | memClean (void) |
Main cleanup handler. More... | |
void | memInitModule (void) |
void | memCleanModule (void) |
void | memConfigure (void) |
void * | memAllocate (mem_type) |
Allocate one element from the typed pool. More... | |
void * | memAllocString (size_t net_size, size_t *gross_size) |
void * | memAllocBuf (size_t net_size, size_t *gross_size) |
void * | memAllocRigid (size_t net_size) |
void * | memReallocBuf (void *buf, size_t net_size, size_t *gross_size) |
void | memFree (void *, int type) |
Free a element allocated by memAllocate() More... | |
void | memFreeString (size_t size, void *) |
void | memFreeBuf (size_t size, void *) |
void | memFreeRigid (void *, size_t net_size) |
FREE * | memFreeBufFunc (size_t size) |
int | memInUse (mem_type) |
void | memDataInit (mem_type, const char *, size_t, int, bool doZero=true) |
void | memCheckInit (void) |
size_t | memStringCount () |
Variables | |
const size_t | squidSystemPageSize |
Typedef Documentation
◆ FREE
typedef void FREE(void *) |
- Deprecated:
- use MEMPROXY_CLASS instead.
Enumeration Type Documentation
◆ mem_type
enum mem_type |
Function Documentation
◆ memAllocate()
void * memAllocate | ( | mem_type | type | ) |
Definition at line 213 of file old_api.cc.
References Mem::Allocator::alloc(), assert, and GetPool().
Referenced by diskCombineWrites(), file_read(), file_write(), memAllocBuf(), netdbBinaryExchange(), Ftp::Gateway::parseListing(), and storeKeyDup().
◆ memAllocBuf()
Definition at line 46 of file minimal.cc.
References HugeBufCountMeter, HugeBufVolumeMeter, MEM_NONE, memAllocate(), memFindBufSizeType(), and xcalloc().
Referenced by Ftp::CtrlChannel::CtrlChannel(), memAllocString(), memReallocBuf(), Helper::Client::openSessions(), statefulhelper::openSessions(), and Rock::IoState::writeToDisk().
◆ memAllocRigid()
void * memAllocRigid | ( | size_t | net_size | ) |
Definition at line 78 of file minimal.cc.
References memFindStringPool(), StrCountMeter, StrVolumeMeter, and xmalloc.
Referenced by PoolingAllocator< Value >::allocate().
◆ memAllocString()
Definition at line 66 of file minimal.cc.
References assert, memAllocBuf(), memFindStringPool(), StrCountMeter, StrVolumeMeter, and xcalloc().
Referenced by String::allocBuffer(), and MemBlob::memAlloc().
◆ memCheckInit()
void memCheckInit | ( | void | ) |
Definition at line 471 of file old_api.cc.
References assert, GetPool(), MEM_MAX, and MEM_NONE.
Referenced by mainInitialize().
◆ memClean()
void memClean | ( | void | ) |
Definition at line 485 of file old_api.cc.
References MemPools::clean(), Config, debugs, MemPools::GetInstance(), Mem::GlobalStats(), SquidConfig::limit, SquidConfig::MemPools, MemPools::setIdleLimit(), and Ping::stats.
Referenced by SquidShutdown().
◆ memCleanModule()
void memCleanModule | ( | void | ) |
◆ memConfigure()
void memConfigure | ( | void | ) |
Set to configured value first
Definition at line 406 of file old_api.cc.
References Config, DBG_IMPORTANT, debugs, MemPools::GetInstance(), SquidConfig::limit, SquidConfig::mem_pools, SquidConfig::MemPools, SquidConfig::onoff, and MemPools::setIdleLimit().
Referenced by configDoConfigure().
◆ memDataInit()
Definition at line 200 of file old_api.cc.
References assert, GetPool(), memPoolCreate, size, and Mem::Allocator::zeroBlocks().
Referenced by Mem::Init().
◆ memFree()
void memFree | ( | void * | memory, |
int | type | ||
) |
Definition at line 60 of file minimal.cc.
References assert, Mem::Allocator::freeOne(), GetPool(), and xfree.
Referenced by Ftp::Gateway::~Gateway(), diskCombineWrites(), diskHandleRead(), diskHandleWrite(), memFree16K(), memFree2K(), memFree32K(), memFree4K(), memFree64K(), memFree8K(), memFreeBuf(), netdbBinaryExchange(), Ftp::Gateway::parseListing(), and storeKeyFree().
◆ memFreeBuf()
void memFreeBuf | ( | size_t | size, |
void * | buf | ||
) |
Definition at line 90 of file minimal.cc.
References HugeBufCountMeter, HugeBufVolumeMeter, MEM_NONE, memFindBufSizeType(), memFree(), size, and xfree.
Referenced by Ftp::CtrlChannel::~CtrlChannel(), ESIVariableQuery::~ESIVariableQuery(), Helper::SessionBase::~SessionBase(), MemBuf::clean(), and memReallocBuf().
◆ memFreeBufFunc()
Definition at line 102 of file minimal.cc.
References cxx_xfree(), HugeBufCountMeter, HugeBufVolumeMeter, memFree16K(), memFree2K(), memFree32K(), memFree4K(), memFree64K(), memFree8K(), myFree(), and size.
Referenced by MemBuf::freeFunc(), and Rock::IoState::writeToDisk().
◆ memFreeRigid()
void memFreeRigid | ( | void * | buf, |
size_t | net_size | ||
) |
Definition at line 84 of file minimal.cc.
References memFindStringPool(), StrCountMeter, StrVolumeMeter, and xfree.
Referenced by PoolingAllocator< Value >::deallocate().
◆ memFreeString()
void memFreeString | ( | size_t | size, |
void * | memory | ||
) |
Definition at line 72 of file minimal.cc.
References assert, memFindStringPool(), size, StrCountMeter, StrVolumeMeter, and xfree.
Referenced by MemBlob::~MemBlob(), and String::clean().
◆ memInitModule()
void memInitModule | ( | void | ) |
◆ memInUse()
Definition at line 501 of file old_api.cc.
References Mem::Allocator::getInUseCount(), and GetPool().
◆ memReallocBuf()
Definition at line 53 of file minimal.cc.
References memAllocBuf(), memFreeBuf(), and xrealloc().
Referenced by ESIVariableQuery::ESIVariableQuery(), MemBuf::grow(), and Ftp::Client::handleControlReply().
◆ memStringCount()
size_t memStringCount | ( | ) |
Definition at line 264 of file old_api.cc.
References Mem::Allocator::getInUseCount(), GetStrPool(), and mem_str_pool_count.
Variable Documentation
◆ squidSystemPageSize
|
extern |