]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/mem/Pages.h
6 #ifndef SQUID_IPC_MEM_PAGES_H
7 #define SQUID_IPC_MEM_PAGES_H
15 /* Single page manipulation */
17 /// sets page ID and returns true unless no free pages are found
18 bool GetPage(PageId
&page
);
20 /// makes identified page available as a free page to future GetPage() callers
21 void PutPage(PageId
&page
);
23 /// converts page handler into a temporary writeable shared memory pointer
24 void *PagePointer(const PageId
&page
);
27 /* Limits and statistics */
29 /// the total number of shared memory bytes that can be in use at any time
32 /// approximate total number of shared memory bytes used now
35 /// approximate total number of shared memory bytes we can allocate now
36 inline size_t Available() { return Limit() - Level(); }
38 /// returns page size in bytes; all pages are assumed to be the same size
45 #endif // SQUID_IPC_MEM_PAGES_H