PageStack.cc
Go to the documentation of this file.
129 debugs(54, 5, "rounded capacity up from " << capacity << " to " << (leafNodeCount*BitsPerLeaf));
235 Ipc::Mem::IdSet::innerTruncate(const Position pos, const NavigationDirection dir, const size_type toSubtract)
bool pageIdIsValid(const PageId &page) const
Definition: PageStack.cc:483
Definition: parse.c:104
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
static const IdSet::size_type BitsPerLeaf
the maximum number of pages that a leaf node can store
Definition: PageStack.cc:51
IdSetNavigationDirection ascendDirection() const
which direction is this position from our parent node
Definition: PageStack.cc:106
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
IdSet::size_type offset
the number of nodes (at our level) to the left of us
Definition: PageStack.cc:70
void push(PageId &page)
makes value available as a free page number to future pop() callers
Definition: PageStack.cc:465
IdSet::size_type level
the number of levels above us (e.g., zero for the root node)
Definition: PageStack.cc:68
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
Definition: PageStack.cc:53
IdSetInnerNode()=default
size_type innerTruncate(Position pos, NavigationDirection dir, size_type toSubtract)
Definition: PageStack.cc:235
Packed pack() const
returns a serializes value suitable for shared memory storage
Definition: PageStack.cc:87
static int trailingZeros(uint64_t x)
a temporary C++20 countr_zero() replacement
Definition: PageStack.cc:308
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
a helper class to perform inner node manipulation for IdSet
Definition: PageStack.cc:74
static size_t SharedMemorySize(const Config &)
total shared memory size required to share
Definition: PageStack.cc:496
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