Memory Management (Memory Pool Allocator)
Collaboration diagram for Memory Management (Memory Pool Allocator):
Classes | |
class | MemPools |
class | MemPoolChunked |
class | MemChunk |
class | MemPoolMalloc |
Macros | |
#define | toMB(size) ( ((double) size) / ((double)(1024*1024)) ) |
#define | toKB(size) ( (size + 1024 - 1) / 1024 ) |
Detailed Description
- MemPools are a pooled memory allocator running on top of malloc(). It's purpose is to reduce memory fragmentation and provide detailed statistics on memory consumption.
- Preferably all memory allocations in Squid should be done using MemPools or one of the types built on top of it (i.e. cbdata).
- Note
- Usually it is better to use cbdata types as these gives you additional safeguards in references and typechecking. However, for high usage pools where the cbdata functionality of cbdata is not required directly using a MemPool might be the way to go.
Macro Definition Documentation
◆ toKB
◆ toMB
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