Squid Web Cache master
Loading...
Searching...
No Matches
Ipc::Mem Namespace Reference

Classes

class  FlexibleArray
 
class  IdSet
 a shareable set of positive uint32_t IDs with O(1) insertion/removal ops More...
 
class  IdSetInnerNode
 a helper class to perform inner node manipulation for IdSet More...
 
class  IdSetMeasurements
 basic IdSet storage parameters, extracted here to keep them constant More...
 
class  IdSetPosition
 
class  Object
 attaches to a shared memory segment with Class object owned by Owner More...
 
class  Owner
 
class  PageId
 Shared memory page identifier, address, or handler. More...
 
class  PagePool
 
class  PageStack
 
class  Pointer
 
class  RegisteredRunner
 
class  Segment
 POSIX shared memory segment. More...
 

Typedefs

typedef uint32_t PoolId
 

Enumerations

enum  IdSetNavigationDirection { dirNone , dirLeft , dirRight , dirEnd }
 

Functions

std::ostream & operator<< (std::ostream &os, const PageId &page)
 writes page address (e.g., "sh_page5.3"), for debugging
 
bool GetPage (const PageId::Purpose purpose, PageId &page)
 sets page ID and returns true unless no free pages are found
 
void PutPage (PageId &page)
 makes identified page available as a free page to future GetPage() callers
 
char * PagePointer (const PageId &page)
 converts page handler into a temporary writeable shared memory pointer
 
size_t PageLimit ()
 the total number of shared memory pages that can be in use at any time
 
size_t PageLimit (const int purpose)
 
size_t PageLevel ()
 approximate total number of shared memory pages used now
 
size_t PageLevel (const int purpose)
 approximate total number of shared memory pages used now for given purpose
 
size_t PagesAvailable ()
 approximate total number of shared memory pages we can allocate now
 
size_t PagesAvailable (const int purpose)
 
size_t PageSize ()
 returns page size in bytes; all pages are assumed to be the same size
 
void NotePageNeed (const int purpose, const int count)
 claim the need for a number of pages for a given purpose
 

Variables

static const IdSet::size_type BitsPerLeaf = 64
 the maximum number of pages that a leaf node can store
 

Typedef Documentation

◆ PoolId

typedef uint32_t Ipc::Mem::PoolId

Definition at line 17 of file forward.h.

Enumeration Type Documentation

◆ IdSetNavigationDirection

Enumerator
dirNone 
dirLeft 
dirRight 
dirEnd 

Definition at line 27 of file PageStack.h.

Function Documentation

◆ GetPage()

bool Ipc::Mem::GetPage ( const PageId::Purpose  purpose,
PageId page 
)

◆ NotePageNeed()

void Ipc::Mem::NotePageNeed ( const int  purpose,
const int  count 
)

Definition at line 72 of file Pages.cc.

References Must, and TheLimits.

Referenced by IpcIoRr::claimMemoryNeeds(), and MemStoreRr::claimMemoryNeeds().

◆ operator<<()

std::ostream & Ipc::Mem::operator<< ( std::ostream &  os,
const PageId page 
)

Definition at line 16 of file Page.cc.

References Ipc::Mem::PageId::number, and Ipc::Mem::PageId::pool.

◆ PageLevel() [1/2]

◆ PageLevel() [2/2]

size_t Ipc::Mem::PageLevel ( const int  purpose)

Definition at line 86 of file Pages.cc.

References Ipc::Mem::PagePool::level(), and ThePagePool.

◆ PageLimit() [1/2]

◆ PageLimit() [2/2]

size_t Ipc::Mem::PageLimit ( const int  purpose)

the total number of shared memory pages that can be in use at any time for given purpose

Definition at line 64 of file Pages.cc.

References Must, and TheLimits.

◆ PagePointer()

char * Ipc::Mem::PagePointer ( const PageId page)

◆ PagesAvailable() [1/2]

size_t Ipc::Mem::PagesAvailable ( )
inline

Definition at line 47 of file Pages.h.

References PageLevel(), and PageLimit().

Referenced by GetPage(), and MemStore::stat().

◆ PagesAvailable() [2/2]

size_t Ipc::Mem::PagesAvailable ( const int  purpose)
inline

approximate total number of shared memory pages we can allocate now for given purpose

Definition at line 51 of file Pages.h.

References PageLevel(), and PageLimit().

◆ PageSize()

◆ PutPage()

void Ipc::Mem::PutPage ( PageId page)

Variable Documentation

◆ BitsPerLeaf