pike.git / src / block_alloc.h

version» Context lines:

pike.git/src/block_alloc.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: block_alloc.h,v 1.75 2004/12/08 09:38:46 grubba Exp $ + || $Id: block_alloc.h,v 1.76 2005/04/08 16:51:40 grubba Exp $   */      #undef PRE_INIT_BLOCK   #undef DO_PRE_INIT_BLOCK   #undef INIT_BLOCK   #undef EXIT_BLOCK   #undef BLOCK_ALLOC   #undef LOW_PTR_HASH_ALLOC   #undef PTR_HASH_ALLOC_FIXED   #undef PTR_HASH_ALLOC
pike.git/src/block_alloc.h:405:    *size_=size; \    DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \   } \    \    \   void PIKE_CONCAT3(init_,DATA,_blocks)(void) \   { \   /* DO_IF_RUN_UNLOCKED(mt_init_recursive(&PIKE_CONCAT(DATA,_mutex)));*/ \    DO_IF_RUN_UNLOCKED(mt_init(&PIKE_CONCAT(DATA,_mutex))); \    PIKE_CONCAT(DATA,_free_blocks)=0; \ - } \ + }            #define LOW_PTR_HASH_ALLOC(DATA,BSIZE) \    \   BLOCK_ALLOC(DATA,BSIZE) \    \   struct DATA **PIKE_CONCAT(DATA,_hash_table)=0; \   size_t PIKE_CONCAT(DATA,_hash_table_size)=0; \   size_t PIKE_CONCAT(DATA,_hash_table_magnitude)=0; \
pike.git/src/block_alloc.h:631:    \    DO_IF_DEBUG( if(!PIKE_CONCAT(DATA,_hash_table)) \    Pike_fatal("Hash table error!\n"); ) \    PIKE_CONCAT(num_,DATA)++; \    \    p=BA_UL(PIKE_CONCAT(alloc_,DATA))(); \    p->PTR_HASH_ALLOC_DATA=ptr; \    p->BLOCK_ALLOC_NEXT=PIKE_CONCAT(DATA,_hash_table)[hval]; \    PIKE_CONCAT(DATA,_hash_table)[hval]=p; \    return p; \ - } \ + }         #define PTR_HASH_ALLOC(DATA,BSIZE) \   struct DATA *PIKE_CONCAT3(make_,DATA,_unlocked)(void *ptr, \    PIKE_HASH_T hval); \   LOW_PTR_HASH_ALLOC(DATA,BSIZE) \    \   static void PIKE_CONCAT(DATA,_rehash)() \   { \    /* Time to re-hash */ \