PageStack.h
bool pageIdIsValid(const PageId &page) const
Definition: PageStack.cc:483
void leafPush(Position, size_type id)
adds the given ID to the leaf node at the given position
Definition: PageStack.cc:296
void leafTruncate(Position pos, size_type idsToKeep)
fill the leaf node at a given position with 0s, leaving only idsToKeep IDs
Definition: PageStack.cc:222
void innerPush(Position, NavigationDirection)
accounts for an ID added to subtree in the given dir from the given position
Definition: PageStack.cc:258
a shareable set of positive uint32_t IDs with O(1) insertion/removal ops
Definition: PageStack.h:53
basic IdSet storage parameters, extracted here to keep them constant
Definition: PageStack.h:30
Definition: PageStack.h:108
std::atomic< PageCount > size_
a lower bound for the number of free pages (for debugging purposes)
Definition: PageStack.h:176
void push(PageId &page)
makes value available as a free page number to future pop() callers
Definition: PageStack.cc:465
size_type capacity
the maximum number of pages our tree is allowed to store
Definition: PageStack.h:39
static PoolId IdForMultipurposePool()
multipurpose PagePool of shared memory pages
Definition: PageStack.h:169
static size_t StackSize(const PageCount capacity)
Definition: PageStack.cc:504
static size_t LevelsPaddingSize(const PageCount capacity)
Definition: PageStack.cc:519
size_type leafPop(Position)
extracts and returns an ID from the leaf node at the given position
Definition: PageStack.cc:320
size_type requestedLeafNodeCount
the number of leaf nodes that satisfy capacity requirements
Definition: PageStack.h:42
Definition: PageStack.cc:53
size_type innerTruncate(Position pos, NavigationDirection dir, size_type toSubtract)
Definition: PageStack.cc:235
FlexibleArray< StoredNode > nodes_
the entire binary tree flattened into an array
Definition: PageStack.h:101
bool pop(PageId &page)
sets value and returns true unless no free page numbers are found
Definition: PageStack.cc:442
IdSetMeasurements(size_type capacity)
Definition: PageStack.cc:113
PageStack construction and SharedMemorySize calculation parameters.
Definition: PageStack.h:123
uint32_t size_type
we need to fit two size_type counters into one 64-bit lockless atomic
Definition: PageStack.h:34
bool createFull
whether a newly created PageStack should be prefilled with PageIds
Definition: PageStack.h:130
static size_t MemorySize(size_type capacity)
memory size required to store a tree with the given capacity
Definition: PageStack.cc:419
void truncateExtras()
effectively removes IDs that exceed the requested capacity after makeFull()
Definition: PageStack.cc:197
static size_t SharedMemorySize(const Config &)
total shared memory size required to share
Definition: PageStack.cc:496
static PoolId IdForSwapDirSpace(const int dirIdx)
stack of free rock cache_dir slot numbers
Definition: PageStack.h:171
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