]> jfr.im git - irc/quakenet/newserv.git/blame - core/nsmalloc.h
Merge.
[irc/quakenet/newserv.git] / core / nsmalloc.h
CommitLineData
34da4416 1/* nsmalloc: Simple pooled malloc() thing. */
2
3#include <stdlib.h>
4
5void *nsmalloc(unsigned int poolid, size_t size);
6void nsfree(unsigned int poolid, void *ptr);
7void nsfreeall(unsigned int poolid);
103521a1 8void nsexit(void);
48005496
CP
9void *nsrealloc(unsigned int poolid, void *ptr, size_t size);
10int nspoolstats(unsigned int poolid, size_t *size, unsigned long *count);
34da4416 11
12#define MAXPOOL 100
13
14/* Pools here in the order they were created */
bc038b86 15#define POOL_AUTHEXT 0
16#define POOL_CHANINDEX 1
17#define POOL_BANS 2
18#define POOL_CHANNEL 3
19#define POOL_NICK 4
20#define POOL_CHANSERVDB 5
21#define POOL_SSTRING 6
22#define POOL_AUTHTRACKER 7
818e3d5f 23#define POOL_PROXYSCAN 8
d0e17ef9 24#define POOL_LUA 9
48005496 25#define POOL_TROJANSCAN 10
5ab07198 26#define POOL_NTERFACER 11