/*
- * 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.
{
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;
};