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.71 2004/04/03 15:55:15 mast Exp $ + || $Id: block_alloc.h,v 1.72 2004/05/31 23:51:28 nilsson 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:521:    BA_UL(PIKE_CONCAT(really_free_,DATA))(p); \    DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \    return 1; \    } \    DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \    return 0; \   } \    \   void PIKE_CONCAT3(low_init_,DATA,_hash)(size_t size) \   { \ -  extern INT32 hashprimes[32]; \ +  extern const INT32 hashprimes[32]; \    extern int my_log2(size_t x); \    PIKE_CONCAT3(init_,DATA,_blocks)(); \    DO_IF_RUN_UNLOCKED(mt_lock(&PIKE_CONCAT(DATA,_mutex))); \    PIKE_CONCAT(DATA,_hash_table_size)= \    hashprimes[PIKE_CONCAT(DATA,_hash_table_magnitude)=my_log2(size)]; \    \    PIKE_CONCAT(DATA,_hash_table)=(struct DATA **) \    malloc(sizeof(struct DATA *)*PIKE_CONCAT(DATA,_hash_table_size)); \    if(!PIKE_CONCAT(DATA,_hash_table)) \    { \
pike.git/src/block_alloc.h:584:         #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 */ \ -  extern INT32 hashprimes[32]; \ +  extern const INT32 hashprimes[32]; \    struct DATA **old_hash; \    struct DATA *p; \    PIKE_HASH_T hval; \    size_t e; \    \    old_hash= PIKE_CONCAT(DATA,_hash_table); \    e=PIKE_CONCAT(DATA,_hash_table_size); \    \    PIKE_CONCAT(DATA,_hash_table_magnitude)++; \    PIKE_CONCAT(DATA,_hash_table_size)= \