Branch: Tag:

2014-12-04

2014-12-04 19:23:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Pike.gc_parameters: The pre_cb now actually works.

Fixes infinite recursion when a pre_cb is installed and gc()
is run implicitly.

3482:    return 0;    }    -  if (!SAFE_IS_ZERO(&gc_pre_cb)) { -  safe_apply_svalue(&gc_pre_cb, 0, 1); -  pop_stack(); -  } -  +    #ifdef DEBUG_MALLOC    if(debug_options & GC_RESET_DMALLOC)    reset_debug_malloc();
3494:    init_gc();    gc_generation++;    Pike_in_gc=GC_PASS_PREPARE; +  +  if (!SAFE_IS_ZERO(&gc_pre_cb)) { +  safe_apply_svalue(&gc_pre_cb, 0, 1); +  pop_stack(); +  } +     gc_start_time = get_cpu_time();    gc_start_real_time = get_real_time();   #ifdef GC_DEBUG