]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/mem/Page.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / ipc / mem / Page.h
index a9e36db0a51c29b889b88be053587d5151f35ae5..575537a0a53d9fef2757cdc9925d625864a1d9e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -9,6 +9,8 @@
 #ifndef SQUID_IPC_MEM_PAGE_H
 #define SQUID_IPC_MEM_PAGE_H
 
+#include "ipc/mem/forward.h"
+
 #include <iosfwd>
 
 namespace Ipc
@@ -30,7 +32,12 @@ public:
     typedef const uint32_t PageId::*SaferBool;
     operator SaferBool() const { return set() ? &PageId::number : NULL; }
 
-    uint32_t pool; ///< page pool ID within Squid
+    /// The ID of a PagePool (and/or PageStack) this page belongs to.
+    /// Positive values are (ab)used to detect in-use pages. See set().
+    /// Eventually, they may identify a PageStack in a multi-segment PagePool.
+    /// These IDs also distinguish page pools/stacks in debugging logs.
+    PoolId pool;
+
     // uint32_t segment; ///< memory segment ID within the pool; unused for now
     uint32_t number; ///< page number within the segment