pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c: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: gc.c,v 1.327 2008/10/05 00:23:24 mast Exp $ + || $Id: gc.c,v 1.328 2008/10/11 17:18:38 grubba Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:4237:    * externally and should not be memory counted.    *    * If there's anything left in the complete list then it's internal    * cyclic stuff. In that case we put those things into the work list    * at max lookahead count, move the indirectly incomplete list back to    * complete and repeat MC_PASS_LOOKAHEAD. Otherwise we're done.    */      /* #define MEMORY_COUNT_DEBUG */    - #define MC_WQ_START_SIZE 1024 + #define MC_WQ_START_SIZE 8 /*1024*/      PMOD_EXPORT int mc_pass;   PMOD_EXPORT size_t mc_counted_bytes;      static int mc_lookahead, mc_block_pike_cycle_depth;   static unsigned mc_count_revisits;   static TYPE_FIELD mc_block_lookahead;   static TYPE_FIELD mc_block_lookahead_default = BIT_PROGRAM|BIT_STRING|BIT_TYPE;   /* Strings are blocked because they don't contain refs. Types are    * blocked because they are acyclic and don't contain refs to anything
pike.git/src/gc.c:4544:    if (m->queuepos != MAX_UINT32) {    assert (m->queuepos < mc_wq_used);    assert (m->queuepos * 2 >= mc_wq_used ||    m_la_count >= mc_work_queue[m->queuepos * 2]->la_count);    assert (m->queuepos * 2 + 1 >= mc_wq_used ||    m_la_count >= mc_work_queue[m->queuepos * 2 + 1]->la_count);    pos = m->queuepos;    }       else { -  if (mc_wq_used > mc_wq_size + 1) { +  if (mc_wq_used > mc_wq_size) {    struct mc_marker **p;    mc_wq_size *= 2;    p = realloc (mc_work_queue + 1, mc_wq_size * sizeof (mc_work_queue[0]));    if (!p) {    make_error (msg_out_of_mem_2, mc_wq_size * sizeof (mc_work_queue[0]));    free_svalue (&throw_value);    move_svalue (&throw_value, --Pike_sp);    mc_wq_size /= 2;    return;    }