]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/mem/PagePool.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / ipc / mem / PagePool.h
index dd94d60e55a07f2e726c38888e518e4ce177323d..3a9d4aa8ca952f85e21c29585428ba36671363df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -27,7 +27,7 @@ class PagePool
 public:
     typedef Ipc::Mem::Owner<PageStack> Owner;
 
-    static Owner *Init(const char *const id, const unsigned int capacity, const size_t pageSize);
+    static Owner *Init(const char *const shmId, const Ipc::Mem::PoolId stackId, const unsigned int capacity, const size_t pageSize);
 
     PagePool(const char *const id);
 
@@ -49,7 +49,8 @@ public:
 
 private:
     Ipc::Mem::Pointer<PageStack> pageIndex; ///< free pages index
-    typedef std::atomic<size_t> Levels_t;
+    using Levels_t = PageStack::Levels_t;
+
     /// number of shared memory pages used now for each purpose
     Levels_t * const theLevels;
     char *const theBuf; ///< pages storage