PoolMalloc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef _MEM_POOL_MALLOC_H_
10#define _MEM_POOL_MALLOC_H_
11
31#include "mem/Pool.h"
32
33#include <stack>
34
37{
38public:
39 MemPoolMalloc(char const *label, size_t aSize);
41 virtual bool idleTrigger(int shift) const;
42 virtual void clean(time_t maxage);
43
48 virtual int getStats(MemPoolStats * stats, int accumulate);
49
50 virtual int getInUseCount();
51protected:
52 virtual void *allocate();
53 virtual void deallocate(void *, bool aggressive);
54private:
55 std::stack<void *> freelist;
56};
57
58#endif /* _MEM_POOL_MALLOC_H_ */
59
const char * label
Definition: Pool.h:236
virtual void deallocate(void *, bool aggressive)
Definition: PoolMalloc.cc:44
virtual void * allocate()
Definition: PoolMalloc.cc:22
virtual int getInUseCount()
Definition: PoolMalloc.cc:86
MemPoolMalloc(char const *label, size_t aSize)
Definition: PoolMalloc.cc:91
virtual bool idleTrigger(int shift) const
Definition: PoolMalloc.cc:102
std::stack< void * > freelist
Definition: PoolMalloc.h:55
virtual void clean(time_t maxage)
Definition: PoolMalloc.cc:108
virtual int getStats(MemPoolStats *stats, int accumulate)
Definition: PoolMalloc.cc:60
class Ping::pingStats_ stats

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors