]>
jfr.im git - irc/quakenet/newserv.git/blob - channel/channelalloc.c
4 #include "../core/nsmalloc.h"
7 return nsmalloc(POOL_CHANNEL
, sizeof(channel
));
10 void freechan(channel
*cp
) {
11 nsfree(POOL_CHANNEL
, cp
);
14 chanuserhash
*newchanuserhash(int hashsize
) {
16 chanuserhash
*cuhp
= nsmalloc(POOL_CHANNEL
, sizeof(chanuserhash
));
21 /* Don't use nsmalloc() here since we will free this in freechanuserhash() */
22 cuhp
->content
=(unsigned long *)malloc(hashsize
*sizeof(unsigned long));
23 for (i
=0;i
<hashsize
;i
++) {
24 cuhp
->content
[i
]=nouser
;
27 cuhp
->hashsize
=hashsize
;
33 void freechanuserhash(chanuserhash
*cuhp
) {
35 nsfree(POOL_CHANNEL
, cuhp
);