pike.git / src / pike_search_engine.c

version» Context lines:

pike.git/src/pike_search_engine.c:329:    struct mapping_data *md = memsearch_cache->data;    int e;    int count = 0;    /* NB: We inline some stuff from mapping.c here to avoid copying the md.    */    for (e=0; e < md->hashsize; e++) {    struct keypair **prev;    for(prev = md->hash + e; (k = *prev);) {    count++;    if (REFCOUNTED_TYPE(TYPEOF(k->val)) && -  (*k->val.u.refs == 1)) { -  /* map_delete(memsearch_cache, &k->ind); */ +  (*k->val.u.refs == 1)) +  {    *prev = k->next;    free_svalue(&k->ind);    free_svalue(&k->val);    mapping_free_keypair(md, k);    md->size--;    continue; -  } else if (count < 10) { -  // locate_references(k->val.u.refs); +     }    prev = &k->next;    }    }    memsearch_cache_threshold = (memsearch_cache->data->size<<1) | 1;    if (memsearch_cache_threshold < MIN_MEMSEARCH_THRESHOLD) {    memsearch_cache_threshold = MIN_MEMSEARCH_THRESHOLD;    }    } else if ((memsearch_cache_threshold & 1) &&    (memsearch_cache->data->size<<2 < memsearch_cache_threshold)) {