Allocator.h
Go to the documentation of this file.
93 static size_t RoundedSize(const size_t minSize) { return ((minSize + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*); }
virtual void clean(time_t maxage)=0
Definition: Meter.h:54
void * alloc()
provide (and reserve) memory suitable for storing one object
Definition: Allocator.h:44
virtual size_t getStats(PoolStats &)=0
Definition: Allocator.h:21
int getInUseCount() const
the difference between the number of alloc() and freeOne() calls
Definition: Allocator.h:59
convenience base for any class with pure virtual method(s)
Definition: TypeTraits.h:18
size_t countSavedAllocs
the number of malloc()/calloc() calls avoided since last flush
Definition: Allocator.h:101
void update(size_t items, size_t itemSize)
account for memory actions taking place
Definition: Meter.h:68
size_t countAlloc
the number of calls to Mem::Allocator::alloc() since last flush
Definition: Allocator.h:98
const size_t objectSize
the size (in bytes) of objects managed by this allocator
Definition: Allocator.h:112
static const size_t FlushLimit
Flush counters to 'meter' after flush limit allocations.
Definition: Allocator.h:25
static size_t RoundedSize(const size_t minSize)
Definition: Allocator.h:93
virtual bool idleTrigger(int shift) const =0
virtual void setChunkSize(size_t)
XXX: Misplaced – not all allocators have a notion of a "chunk". See MemPoolChunked.
Definition: Allocator.h:65
size_t countFreeOne
the number of calls to Mem::Allocator::freeOne() since last flush
Definition: Allocator.h:104
Allocator(const char *const aLabel, const size_t sz)
Definition: Allocator.h:27
Definition: Stats.h:17
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products