X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/0555113a1222d28d156832123d8f0936538807a9..78546f2b0f59b5c8fede1ce5535972716eb17041:/core/nsmalloc.h?ds=sidebyside diff --git a/core/nsmalloc.h b/core/nsmalloc.h index b62e6353..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 { unsigned long count; size_t size; - struct nsminfo first; + struct nsminfo *blocks; }; extern struct nsmpool nsmpools[MAXPOOL]; @@ -64,7 +67,9 @@ beginpools() { pool(GLINE), pool(TRUSTS), pool(SPAMSCAN2), - pool(ACHIEVEMENTS) + pool(ACHIEVEMENTS), + pool(CHANSTATS), + pool(SCHEDULE) } endpools() #undef pool