From cfa7d88da008cb112fa5735e5e6718f834e47fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 27 Jan 2000 15:13:03 -0800 Subject: [PATCH] added support for customizable memory counting Rev: src/block_alloc.h:1.15 --- src/block_alloc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/block_alloc.h b/src/block_alloc.h index 408f6e2c27..51d4b3160b 100644 --- a/src/block_alloc.h +++ b/src/block_alloc.h @@ -1,13 +1,17 @@ -/* $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,9 +87,11 @@ void PIKE_CONCAT3(count_memory_in_,DATA,s)(INT32 *num_, INT32 *size_) \ { \ 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; \ } -- GitLab