PoolMalloc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 {
38 public:
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();
51 protected:
52  virtual void *allocate();
53  virtual void deallocate(void *, bool aggressive);
54 private:
55  std::stack<void *> freelist;
56 };
57 
58 #endif /* _MEM_POOL_MALLOC_H_ */
59 
MemPoolMalloc(char const *label, size_t aSize)
Definition: PoolMalloc.cc:92
virtual int getInUseCount()
Definition: PoolMalloc.cc:87
class Ping::pingStats_ stats
virtual bool idleTrigger(int shift) const
Definition: PoolMalloc.cc:103
const char * label
Definition: Pool.h:236
virtual int getStats(MemPoolStats *stats, int accumulate)
Definition: PoolMalloc.cc:61
virtual void deallocate(void *, bool aggressive)
Definition: PoolMalloc.cc:45
std::stack< void * > freelist
Definition: PoolMalloc.h:55
virtual void clean(time_t maxage)
Definition: PoolMalloc.cc:109
virtual void * allocate()
Definition: PoolMalloc.cc:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors