pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:174:    INT32 hashsize;       debug_malloc_touch(m);   #ifdef PIKE_DEBUG    if (Pike_in_gc > GC_PASS_PREPARE && Pike_in_gc < GC_PASS_ZAP_WEAK)    Pike_fatal("Can't allocate a new mapping_data inside gc.\n");    if(size < 0) Pike_fatal("init_mapping with negative value.\n");   #endif    if(size)    { -  hashsize = size / AVG_LINK_LENGTH + 1; -  hashsize = (hashsize <= 32) ? 32 : find_next_power(hashsize); +  hashsize=find_next_power(size / AVG_LINK_LENGTH + 1);       e=MAPPING_DATA_SIZE(hashsize, size);       md=(struct mapping_data *)xalloc(e);       m->data=md;    md->hashsize=hashsize;       MEMSET((char *)md->hash, 0, sizeof(struct keypair *) * md->hashsize);