Skip to content
Snippets Groups Projects
Commit cfa7d88d authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

added support for customizable memory counting

Rev: src/block_alloc.h:1.15
parent 0e03f68b
No related branches found
No related tags found
No related merge requests found
/* $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; \
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment