2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 13 High Level Memory Pool Management */
11 #ifndef _SQUID_SRC_MEM_FORWARD_H
12 #define _SQUID_SRC_MEM_FORWARD_H
14 #include "mem/AllocatorProxy.h"
27 void Stats(StoreEntry
*);
28 void CleanIdlePools(void *unused
);
29 void Report(std::ostream
&);
30 void PoolReport(const MemPoolStats
* mp_st
, const MemPoolMeter
* AllMeter
, std::ostream
&);
33 extern const size_t squidSystemPageSize
;
35 /// \deprecated use MEMPROXY_CLASS instead.
36 typedef void FREE(void *);
38 /// Types of memory pool which do not yet use MEMPROXY_CLASS() API
47 MEM_ACL_DENY_INFO_LIST
,
57 MEM_HTTP_HDR_CONTENT_RANGE
,
61 // IMPORTANT: leave this here. pools above are initialized early with memInit()
63 // following pools are initialized late by their component if needed (or never)
72 void memInitModule(void);
73 void memCleanModule(void);
74 void memConfigure(void);
75 void *memAllocate(mem_type
);
76 void *memAllocString(size_t net_size
, size_t * gross_size
);
77 void *memAllocBuf(size_t net_size
, size_t * gross_size
);
78 void *memReallocBuf(void *buf
, size_t net_size
, size_t * gross_size
);
79 void memFree(void *, int type
);
80 void memFreeString(size_t size
, void *);
81 void memFreeBuf(size_t size
, void *);
82 FREE
*memFreeBufFunc(size_t size
);
83 int memInUse(mem_type
);
84 void memDataInit(mem_type
, const char *, size_t, int, bool doZero
= true);
85 void memCheckInit(void);
87 #endif /* _SQUID_SRC_MEM_FORWARD_H */