Branch: Tag:

2000-01-27

2000-01-27 23:13:03 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

added support for customizable memory counting

Rev: src/block_alloc.h:1.15

1: - /* $Id: block_alloc.h,v 1.14 1999/12/19 11:02:46 hubbe Exp $ */ + /* $Id: block_alloc.h,v 1.15 2000/01/27 23:13:03 hubbe Exp $ */   #undef PRE_INIT_BLOCK   #undef INIT_BLOCK   #undef EXIT_BLOCK   #undef BLOCK_ALLOC   #undef PTR_HASH_ALLOC -  + #undef COUNT_BLOCK + #undef COUNT_OTHER      #define PRE_INIT_BLOCK(X)   #define INIT_BLOCK(X)   #define EXIT_BLOCK(X) -  + #define COUNT_BLOCK(X) + #define COUNT_OTHER()      #define BLOCK_ALLOC(DATA,BSIZE) \    \
83:    { \    num+=BSIZE; \    size+=sizeof(struct PIKE_CONCAT(DATA,_block)); \ +  COUNT_BLOCK(tmp); \    } \    for(tmp2=PIKE_CONCAT3(free_,DATA,s);tmp2; \    tmp2=tmp2->BLOCK_ALLOC_NEXT) num--; \ -  +  COUNT_OTHER(); \    *num_=num; \    *size_=size; \   }