4218011999-01-31Fredrik Hübinette (Hubbe) #undef BLOCK_ALLOC
fc2c831999-04-01Fredrik Hübinette (Hubbe) #undef PTR_HASH_ALLOC
99b58b1999-09-26Henrik Grubbström (Grubba) #define BLOCK_ALLOC(DATA,SIZE) \ struct DATA *PIKE_CONCAT(alloc_,DATA)(void); \ void PIKE_CONCAT(really_free_,DATA)(struct DATA *d); \ void PIKE_CONCAT3(free_all_,DATA,_blocks)(void); \ void PIKE_CONCAT3(count_memory_in_,DATA,s)(INT32 *num, INT32 *size); \
fc2c831999-04-01Fredrik Hübinette (Hubbe)  #define PTR_HASH_ALLOC(DATA,BSIZE) \ BLOCK_ALLOC(DATA,BSIZE) \
3f84322000-04-23Martin Stjernholm extern struct DATA **PIKE_CONCAT(DATA,_hash_table); \
be759e2001-07-04Fredrik Hübinette (Hubbe) extern size_t PIKE_CONCAT(DATA,_hash_table_size); \
fc2c831999-04-01Fredrik Hübinette (Hubbe) struct DATA *PIKE_CONCAT(find_,DATA)(void *ptr); \ struct DATA *PIKE_CONCAT(get_,DATA)(void *ptr); \ int PIKE_CONCAT3(check_,DATA,_semafore)(void *ptr); \
e6a9051999-09-26Henrik Grubbström (Grubba) int PIKE_CONCAT(remove_,DATA)(void *ptr); \
fc2c831999-04-01Fredrik Hübinette (Hubbe) void PIKE_CONCAT3(init_,DATA,_hash)(void); \ void PIKE_CONCAT3(exit_,DATA,_hash)(void); \
3f84322000-04-23Martin Stjernholm #define PTR_HASH_LOOP(DATA,HVAL,PTR) \ for ((HVAL) = PIKE_CONCAT(DATA,_hash_table_size); (HVAL)-- > 0;) \ for ((PTR) = PIKE_CONCAT(DATA,_hash_table)[HVAL]; \ (PTR); (PTR) = (PTR)->BLOCK_ALLOC_NEXT)
fc2c831999-04-01Fredrik Hübinette (Hubbe) 
3f84322000-04-23Martin Stjernholm #define BLOCK_ALLOC_NEXT next