X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/35770fa5ec2f4c5965af0e5cd838469c196b1110..c33a5aa269a9ae7bb419857cc1b0e17c1d70e21e:/core/nsmalloc.h diff --git a/core/nsmalloc.h b/core/nsmalloc.h index 657a5828..9410d283 100644 --- a/core/nsmalloc.h +++ b/core/nsmalloc.h @@ -13,29 +13,32 @@ #define endpools() nsmallocpools; extern char *nsmpoolnames[MAXPOOL]; #include +#include void *nsmalloc(unsigned int poolid, size_t size); void nsfree(unsigned int poolid, void *ptr); void nsfreeall(unsigned int poolid); +void nsinit(void); void nsexit(void); void *nsrealloc(unsigned int poolid, void *ptr, size_t size); void nscheckfreeall(unsigned int poolid); +void *nscalloc(unsigned int poolid, size_t nmemb, size_t size); #define MAXPOOL 100 - +#define REDZONE_MAGIC 0x243653E957851F68ULL struct nsminfo { struct nsminfo *next; struct nsminfo *prev; size_t size; + uint64_t redzone; char data[]; }; struct nsmpool { - struct nsminfo first; - unsigned long count; size_t size; + struct nsminfo *blocks; }; extern struct nsmpool nsmpools[MAXPOOL]; @@ -60,6 +63,13 @@ beginpools() { pool(SQLITE), pool(PQSQL), pool(PATRICIA), + pool(PATRICIANICK), + pool(GLINE), + pool(TRUSTS), + pool(SPAMSCAN2), + pool(ACHIEVEMENTS), + pool(CHANSTATS), + pool(SCHEDULE) } endpools() #undef pool