MemMap.h
void freeIfNeeded(Slot &s)
std::atomic< bool > writing
there is a writing user (there can be at most 1)
Definition: ReadWriteLock.h:55
a MemMap basic element, holding basic shareable memory block info
Definition: MemMap.h:33
A map of MemMapSlots indexed by their keys, with read/write slot locking.
Definition: MemMap.h:56
const Slot * openForReading(const cache_key *const key, sfileno &fileno)
open slot for reading, increments read level
Definition: MemMap.cc:153
Slot * openForWritingAt(sfileno fileno, bool overwriteExisting=true)
Definition: MemMap.cc:57
void closeForWriting(const sfileno fileno)
successfully finish writing the entry
Definition: MemMap.cc:91
void updateStats(ReadWriteLockStats &stats) const
adds approximate current stats to the supplied ones
Definition: MemMap.cc:236
void abortWriting(const sfileno fileno)
terminate writing the entry, freeing its slot for others to use
Definition: MemMap.cc:114
const Slot * peekAtReader(const sfileno fileno) const
only works on locked entries; returns nil unless the slot is readable
Definition: MemMap.cc:125
Definition: ReadWriteLock.h:26
Definition: FlexibleArray.h:26
void switchWritingToReading(const sfileno fileno)
stop writing the locked entry and start reading it
Definition: MemMap.cc:102
int slotIndexByKey(const cache_key *const key) const
Definition: MemMap.cc:262
static Owner * Init(const char *const path, const int limit)
initialize shared memory
Definition: MemMap.cc:36
API for adjusting external state when dirty map slot is being freed.
Definition: MemMap.h:142
Definition: Pointer.h:25
const Slot * openForReadingAt(const sfileno fileno)
open slot for reading, increments read level
Definition: MemMap.cc:174
Definition: Pointer.h:57
void set(const unsigned char *aKey, const void *block, size_t blockSize, time_t expire=0)
Definition: MemMap.cc:300
Slot * openForWriting(const cache_key *const key, sfileno &fileno)
Definition: MemMap.cc:42
void freeLocked(Slot &s, bool keepLocked)
unconditionally frees the already exclusively locked slot and releases lock
Definition: MemMap.cc:276
void free(const sfileno fileno)
mark the slot as waiting to be freed and, if possible, free it
Definition: MemMap.cc:138
virtual void noteFreeMapSlot(const sfileno slotId)=0
adjust slot-linked state before a locked Readable slot is erased
void closeForReading(const sfileno fileno)
close slot after reading, decrements read level
Definition: MemMap.cc:207
Definition: IpcIoFile.h:23
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