]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/mem/PoolMalloc.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / mem / PoolMalloc.h
index 70ab17128a7cb367fab98d8755302962630e2139..5b33b168e0959538d7827142423e4b02411fb605 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -37,20 +37,17 @@ class MemPoolMalloc : public MemImplementingAllocator
 {
 public:
     MemPoolMalloc(char const *label, size_t aSize);
-    ~MemPoolMalloc();
-    virtual bool idleTrigger(int shift) const;
-    virtual void clean(time_t maxage);
+    ~MemPoolMalloc() override;
+    bool idleTrigger(int shift) const override;
+    void clean(time_t maxage) override;
 
-    /**
-     \param stats   Object to be filled with statistical data about pool.
-     \retval        Number of objects in use, ie. allocated.
-     */
-    virtual int getStats(MemPoolStats * stats, int accumulate);
+    /* Mem::Allocator API */
+    size_t getStats(Mem::PoolStats &) override;
+    int getInUseCount() override;
 
-    virtual int getInUseCount();
 protected:
-    virtual void *allocate();
-    virtual void deallocate(void *, bool aggressive);
+    void *allocate() override;
+    void deallocate(void *, bool aggressive) override;
 private:
     std::stack<void *> freelist;
 };