]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mem/forward.h
SourceLayout: shuffle memory pool allocators to mem/libmem.la
[thirdparty/squid.git] / src / mem / forward.h
1 /*
2 * Copyright (C) 1996-2014 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 /* DEBUG: section 13 High Level Memory Pool Management */
10
11 #ifndef _SQUID_SRC_MEM_FORWARD_H
12 #define _SQUID_SRC_MEM_FORWARD_H
13
14 /* for mem_type */
15 #include "enums.h"
16 #include "mem/AllocatorProxy.h"
17 /* for FREE */
18 #include "typedefs.h"
19
20 #include <iosfwd>
21
22 class StoreEntry;
23 class MemPoolStats;
24 class MemPoolMeter;
25
26 namespace Mem
27 {
28 void Init();
29 void Report();
30 void Stats(StoreEntry *);
31 void CleanIdlePools(void *unused);
32 void Report(std::ostream &);
33 void PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, std::ostream &);
34 };
35
36 extern const size_t squidSystemPageSize;
37
38 void memClean(void);
39 void memInitModule(void);
40 void memCleanModule(void);
41 void memConfigure(void);
42 void *memAllocate(mem_type);
43 void *memAllocString(size_t net_size, size_t * gross_size);
44 void *memAllocBuf(size_t net_size, size_t * gross_size);
45 void *memReallocBuf(void *buf, size_t net_size, size_t * gross_size);
46 void memFree(void *, int type);
47 void memFreeString(size_t size, void *);
48 void memFreeBuf(size_t size, void *);
49 FREE *memFreeBufFunc(size_t size);
50 int memInUse(mem_type);
51 void memDataInit(mem_type, const char *, size_t, int, bool doZero = true);
52 void memCheckInit(void);
53
54 #endif /* _SQUID_SRC_MEM_FORWARD_H */