Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

gc.c File Reference

#include "ruby.h"
#include "rubysig.h"
#include "st.h"
#include "node.h"
#include "env.h"
#include "re.h"
#include <stdio.h>
#include <setjmp.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <alloca.h>

Go to the source code of this file.

Data Structures

struct  gc_list
struct  heaps_slot
struct  RVALUE

Defines

#define setjmp(env)   _setjmp(env)
#define GC_MALLOC_LIMIT   8000000
#define HEAPS_INCREMENT   10
#define HEAP_MIN_SLOTS   10000
#define FREE_MIN   4096
#define RANY(o)   ((RVALUE*)(o))
#define SET_STACK_END   VALUE *stack_end = alloca(1)
#define STACK_END   (stack_end)
#define STACK_LENGTH   (rb_gc_stack_start - STACK_END)
#define STACK_UPPER(x, a, b)   b
#define GC_WATER_MARK   512
#define CHECK_STACK(ret)
#define MARK_STACK_MAX   1024
#define MARK_STACK_EMPTY   (mark_stack_ptr == mark_stack)
#define GC_LEVEL_MAX   250
#define STR_ASSOC   FL_USER3

Typedefs

typedef RVALUE RVALUE

Functions

void re_free_registers (struct re_registers *)
void rb_io_fptr_finalize (struct OpenFile *)
void run_final ()
void garbage_collect ()
void rb_memerror ()
void * ruby_xmalloc (long size)
void * ruby_xcalloc (long n, long size)
void * ruby_xrealloc (void *ptr, long size)
void ruby_xfree (void *x)
VALUE rb_gc_enable ()
VALUE rb_gc_disable ()
void rb_gc_register_address (VALUE *addr)
void rb_gc_unregister_address (VALUE *addr)
void rb_global_variable (VALUE *var)
void add_heap ()
VALUE rb_newobj ()
VALUE rb_data_object_alloc (VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
int ruby_stack_length (VALUE **p)
int ruby_stack_check ()
void init_mark_stack ()
char * rb_source_filename (char *f) const
void mark_source_filename (char *f)
int sweep_source_filename (char *key, char *value)
void gc_mark (VALUE ptr, int lev)
void gc_mark_children (VALUE ptr, int lev)
void gc_mark_all ()
void gc_mark_rest ()
int is_pointer_to_heap (void *ptr)
void mark_locations_array (VALUE *x, long n)
void rb_gc_mark_locations (VALUE *start, VALUE *end)
int mark_entry (ID key, VALUE value, int lev)
void mark_tbl (st_table *tbl, int lev)
void rb_mark_tbl (st_table *tbl)
int mark_keyvalue (VALUE key, VALUE value, int lev)
void mark_hash (st_table *tbl, int lev)
void rb_mark_hash (st_table *tbl)
void rb_gc_mark_maybe (VALUE obj)
void rb_gc_mark (VALUE ptr)
void obj_free (VALUE)
void finalize_list (RVALUE *p)
void free_unused_heaps ()
void gc_sweep ()
void rb_gc_force_recycle (VALUE p)
void rb_gc_mark_frame (struct FRAME *frame)
void rb_gc ()
VALUE rb_gc_start ()
void ruby_set_stack_size (size_t size)
void Init_stack (VALUE *addr)
void Init_heap ()
VALUE os_live_obj ()
VALUE os_obj_of (VALUE of)
VALUE os_each_obj (int argc, VALUE *argv)
VALUE add_final (VALUE os, VALUE block)
VALUE rm_final (VALUE os, VALUE block)
VALUE finals ()
VALUE call_final (VALUE os, VALUE obj)
VALUE undefine_final (VALUE os, VALUE obj)
VALUE define_final (int argc, VALUE *argv, VALUE os)
void rb_gc_copy_finalizer (VALUE dest, VALUE obj)
VALUE run_single_final (VALUE *args)
void run_final (VALUE obj)
void rb_gc_finalize_deferred ()
void rb_gc_call_finalizer_at_exit ()
VALUE id2ref (VALUE obj, VALUE id)
void Init_GC ()

Variables

unsigned long malloc_increase = 0
unsigned long malloc_limit = GC_MALLOC_LIMIT
VALUE nomem_error
int ruby_in_compile
int dont_gc
int during_gc
int need_call_final = 0
st_tablefinalizer_table = 0
VALUE rb_mGC
gc_listglobal_List
RVALUEfreelist = 0
RVALUEdeferred_final_list = 0
heaps_slotheaps
int heaps_length = 0
int heaps_used = 0
int heap_slots = HEAP_MIN_SLOTS
RVALUEhimem
RVALUElomem
st_tablerb_class_tbl
VALUErb_gc_stack_start = 0
unsigned int STACK_LEVEL_MAX = 655300
VALUE mark_stack [MARK_STACK_MAX]
VALUEmark_stack_ptr
int mark_stack_overflow
st_tablesource_filenames
VALUE finalizers


Define Documentation

#define CHECK_STACK ret   ) 
 

Value:

do {\
    SET_STACK_END;\
    (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
} while (0)

Definition at line 480 of file gc.c.

Referenced by ruby_stack_check().

#define FREE_MIN   4096
 

Definition at line 322 of file gc.c.

Referenced by gc_sweep().

#define GC_LEVEL_MAX   250
 

Definition at line 704 of file gc.c.

Referenced by gc_mark().

#define GC_MALLOC_LIMIT   8000000
 

Definition at line 83 of file gc.c.

Referenced by gc_sweep().

#define GC_WATER_MARK   512
 

Definition at line 478 of file gc.c.

#define HEAP_MIN_SLOTS   10000
 

Definition at line 319 of file gc.c.

Referenced by add_heap().

#define HEAPS_INCREMENT   10
 

Definition at line 311 of file gc.c.

Referenced by add_heap().

#define MARK_STACK_EMPTY   (mark_stack_ptr == mark_stack)
 

Definition at line 515 of file gc.c.

Referenced by garbage_collect().

#define MARK_STACK_MAX   1024
 

Definition at line 503 of file gc.c.

Referenced by gc_mark(), and gc_mark_rest().

#define RANY  )     ((RVALUE*)(o))
 

Definition at line 374 of file gc.c.

Referenced by gc_mark(), gc_mark_children(), is_pointer_to_heap(), obj_free(), rb_gc_call_finalizer_at_exit(), rb_gc_force_recycle(), and rb_newobj().

#define SET_STACK_END   VALUE *stack_end = alloca(1)
 

Definition at line 445 of file gc.c.

Referenced by garbage_collect(), and ruby_stack_length().

#define setjmp env   )     _setjmp(env)
 

Definition at line 55 of file gc.c.

Referenced by garbage_collect().

#define STACK_END   (stack_end)
 

Definition at line 447 of file gc.c.

Referenced by garbage_collect(), and ruby_stack_length().

#define STACK_LENGTH   (rb_gc_stack_start - STACK_END)
 

Definition at line 452 of file gc.c.

Referenced by ruby_stack_length().

#define STACK_UPPER x,
a,
 )     b
 

Definition at line 462 of file gc.c.

Referenced by Init_stack(), and ruby_stack_length().

#define STR_ASSOC   FL_USER3
 

Referenced by gc_mark_children(), rb_str_append(), rb_str_associate(), rb_str_associated(), rb_str_buf_append(), rb_str_buf_cat(), rb_str_cat(), rb_str_new4(), rb_str_replace(), and rb_str_substr().


Typedef Documentation

typedef struct RVALUE RVALUE
 


Function Documentation

VALUE add_final VALUE  os,
VALUE  block
[static]
 

Definition at line 1650 of file gc.c.

References finalizers, rb_ary_push(), rb_eArgError, rb_intern(), rb_obj_classname(), rb_raise(), rb_respond_to(), rb_warn(), and VALUE.

Referenced by Init_GC().

void add_heap  )  [static]
 

Definition at line 327 of file gc.c.

References freelist, HEAP_MIN_SLOTS, heap_slots, heaps, HEAPS_INCREMENT, heaps_length, heaps_used, himem, lomem, malloc, rb_memerror(), realloc, and RUBY_CRITICAL.

Referenced by garbage_collect(), gc_sweep(), and Init_heap().

VALUE call_final VALUE  os,
VALUE  obj
[static]
 

Definition at line 1689 of file gc.c.

References FL_FINALIZE, FL_SET, need_call_final, rb_warn(), and VALUE.

Referenced by Init_GC().

VALUE define_final int  argc,
VALUE argv,
VALUE  os
[static]
 

Definition at line 1726 of file gc.c.

References finalizer_table, FL_FINALIZE, FL_SET, INT2FIX, need_call_final, rb_ary_new3(), rb_ary_push(), rb_block_proc(), rb_eArgError, rb_intern(), rb_obj_classname(), rb_raise(), rb_respond_to(), rb_scan_args(), ruby_safe_level, st_add_direct(), st_init_numtable(), st_lookup(), and VALUE.

Referenced by Init_GC().

void finalize_list RVALUE p  )  [static]
 

Definition at line 1000 of file gc.c.

References FL_SINGLETON, FL_TEST, freelist, run_final(), and VALUE.

Referenced by rb_gc_call_finalizer_at_exit(), and rb_gc_finalize_deferred().

VALUE finals  )  [static]
 

Definition at line 1678 of file gc.c.

References finalizers, and rb_warn().

Referenced by Init_GC().

void free_unused_heaps  )  [static]
 

Definition at line 1016 of file gc.c.

References free, heaps, heaps_used, and heaps_slot::limit.

Referenced by gc_sweep(), and rb_gc_finalize_deferred().

void garbage_collect  )  [static]
 

Definition at line 1309 of file gc.c.

References add_heap(), dont_gc, during_gc, finalizer_table, FLUSH_REGISTER_WINDOWS, freelist, gc_mark(), gc_mark_all(), gc_mark_rest(), gc_sweep(), global_List, init_mark_stack(), is_ruby_native_thread, mark_locations_array(), MARK_STACK_EMPTY, mark_stack_overflow, mark_tbl(), gc_list::next, FRAME::prev, rb_bug(), rb_class_tbl, rb_gc_mark_frame(), rb_gc_mark_global_tbl(), rb_gc_mark_locations(), rb_gc_mark_maybe(), rb_gc_mark_parser(), rb_gc_mark_threads(), rb_gc_mark_trap_list(), rb_gc_stack_start, rb_mark_end_proc(), rb_mark_generic_ivar_tbl(), rb_mark_tbl(), ruby_dyna_vars, ruby_frame, ruby_scope, SET_STACK_END, setjmp, STACK_END, and VALUE.

Referenced by rb_gc(), rb_newobj(), ruby_xmalloc(), and ruby_xrealloc().

void gc_mark VALUE  ptr,
int  lev
[static]
 

Definition at line 707 of file gc.c.

References RVALUE::as, FL_MARK, GC_LEVEL_MAX, gc_mark_children(), mark_stack, MARK_STACK_MAX, mark_stack_overflow, mark_stack_ptr, RANY, rb_special_const_p(), ruby_stack_check(), and VALUE.

Referenced by garbage_collect(), gc_mark_children(), gc_sweep(), mark_entry(), mark_keyvalue(), mark_locations_array(), rb_gc_mark(), rb_gc_mark_frame(), and rb_gc_mark_maybe().

void gc_mark_all  )  [static]
 

Definition at line 563 of file gc.c.

References RVALUE::as, FL_MARK, gc_mark_children(), heaps, heaps_used, init_mark_stack(), heaps_slot::limit, heaps_slot::slot, and VALUE.

Referenced by garbage_collect().

void gc_mark_children VALUE  ptr,
int  lev
[static]
 

Definition at line 742 of file gc.c.

References RVALUE::as, DATA_PTR, ELTS_SHARED, FL_EXIVAR, FL_MARK, FL_TEST, gc_mark(), is_pointer_to_heap(), mark_hash(), mark_locations_array(), mark_source_filename(), mark_tbl(), nd_type, NODE_ALIAS, NODE_ALLOCA, NODE_AND, NODE_ARGS, NODE_ARRAY, NODE_ATTRSET, NODE_BACK_REF, NODE_BLOCK, NODE_BLOCK_ARG, NODE_BLOCK_PASS, NODE_BREAK, NODE_CALL, NODE_CASE, NODE_CDECL, NODE_CFUNC, NODE_CLASS, NODE_COLON2, NODE_COLON3, NODE_CREF, NODE_CVAR, NODE_CVASGN, NODE_CVDECL, NODE_DASGN, NODE_DASGN_CURR, NODE_DEFINED, NODE_DEFN, NODE_DEFS, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DVAR, NODE_DXSTR, NODE_ENSURE, NODE_EVSTR, NODE_FALSE, NODE_FBODY, NODE_FCALL, NODE_FLIP2, NODE_FLIP3, NODE_FOR, NODE_GASGN, NODE_GVAR, NODE_HASH, NODE_IASGN, NODE_IF, NODE_ITER, NODE_IVAR, NODE_LASGN, NODE_LIT, NODE_LVAR, NODE_MASGN, NODE_MATCH, NODE_MATCH2, NODE_MATCH3, NODE_METHOD, NODE_MODULE, NODE_NEWLINE, NODE_NEXT, NODE_NIL, NODE_NOT, NODE_NTH_REF, NODE_OP_ASGN1, NODE_OP_ASGN_AND, NODE_OP_ASGN_OR, NODE_OPT_N, NODE_OR, NODE_POSTEXE, NODE_REDO, NODE_RESBODY, NODE_RESCUE, NODE_RETRY, NODE_RETURN, NODE_SCLASS, NODE_SCOPE, NODE_SELF, NODE_SPLAT, NODE_STR, NODE_SUPER, NODE_SVALUE, NODE_TO_ARY, NODE_TRUE, NODE_UNDEF, NODE_UNTIL, NODE_VALIAS, NODE_VCALL, NODE_WHEN, NODE_WHILE, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NODE_ZSUPER, RANY, rb_bug(), rb_mark_generic_ivar(), rb_special_const_p(), SCOPE_MALLOC, STR_ASSOC, T_ARRAY, T_BIGNUM, T_BLKTAG, T_CLASS, T_DATA, T_FILE, T_FIXNUM, T_FLOAT, T_HASH, T_ICLASS, T_MASK, T_MATCH, T_MODULE, T_NIL, T_NODE, T_OBJECT, T_REGEXP, T_SCOPE, T_STRING, T_STRUCT, T_VARMAP, and VALUE.

Referenced by gc_mark(), gc_mark_all(), and gc_mark_rest().

void gc_mark_rest  )  [static]
 

Definition at line 582 of file gc.c.

References gc_mark_children(), init_mark_stack(), mark_stack, MARK_STACK_MAX, mark_stack_ptr, MEMCPY, and VALUE.

Referenced by garbage_collect().

void gc_sweep  )  [static]
 

Definition at line 1035 of file gc.c.

References add_heap(), RVALUE::as, BUILTIN_TYPE, deferred_final_list, during_gc, FL_FINALIZE, FL_MARK, FL_SINGLETON, FL_TEST, free, FREE_MIN, free_unused_heaps(), freelist, GC_MALLOC_LIMIT, gc_mark(), heaps, heaps_used, heaps_slot::limit, malloc_increase, malloc_limit, mark_source_filename(), need_call_final, obj_free(), RBASIC, ruby_in_compile, ruby_parser_stack_on_heap(), ruby_sourcefile, heaps_slot::slot, source_filenames, st_foreach(), sweep_source_filename(), T_NODE, and VALUE.

Referenced by garbage_collect().

VALUE id2ref VALUE  obj,
VALUE  id
[static]
 

Definition at line 1881 of file gc.c.

References BUILTIN_TYPE, FIXNUM_FLAG, FIXNUM_P, is_pointer_to_heap(), NUM2ULONG, Qfalse, Qnil, Qtrue, rb_eRangeError, rb_id2name(), rb_raise(), rb_secure(), RBASIC, SYM2ID, SYMBOL_P, T_BLKTAG, and VALUE.

Referenced by Init_GC().

void Init_GC void   ) 
 

Definition at line 1913 of file gc.c.

References add_final(), call_final(), define_final(), finalizers, finals(), id2ref(), nomem_error, os_each_obj(), rb_ary_new(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_singleton_method(), rb_eNoMemError, rb_exc_new2(), rb_gc_disable(), rb_gc_enable(), rb_gc_register_address(), rb_gc_start(), rb_gc_unregister_address(), rb_global_variable(), rb_mGC, rm_final(), source_filenames, st_init_strtable(), undefine_final(), and VALUE.

Referenced by rb_call_inits().

void Init_heap void   ) 
 

Definition at line 1520 of file gc.c.

References add_heap(), Init_stack(), and rb_gc_stack_start.

Referenced by ruby_init().

void init_mark_stack  )  [static]
 

Definition at line 509 of file gc.c.

References mark_stack, mark_stack_overflow, and mark_stack_ptr.

Referenced by garbage_collect(), gc_mark_all(), and gc_mark_rest().

void Init_stack VALUE addr  ) 
 

Definition at line 1448 of file gc.c.

References rb_gc_stack_start, STACK_LEVEL_MAX, STACK_UPPER, and VALUE.

Referenced by Init_heap(), rb_thread_create(), ruby_cleanup(), ruby_exec(), ruby_init(), and ruby_options().

int is_pointer_to_heap void *  ptr  )  [inline, static]
 

Definition at line 598 of file gc.c.

References heaps, heaps_used, himem, heaps_slot::limit, Qfalse, Qtrue, RANY, and heaps_slot::slot.

Referenced by gc_mark_children(), id2ref(), mark_locations_array(), and rb_gc_mark_maybe().

int mark_entry ID  key,
VALUE  value,
int  lev
[static]
 

Definition at line 643 of file gc.c.

References gc_mark(), ID, ST_CONTINUE, and VALUE.

Referenced by mark_tbl().

void mark_hash st_table tbl,
int  lev
[static]
 

Definition at line 680 of file gc.c.

References mark_keyvalue(), and st_foreach().

Referenced by gc_mark_children(), and rb_mark_hash().

int mark_keyvalue VALUE  key,
VALUE  value,
int  lev
[static]
 

Definition at line 669 of file gc.c.

References gc_mark(), ST_CONTINUE, and VALUE.

Referenced by mark_hash().

void mark_locations_array VALUE x,
long  n
[static]
 

Definition at line 618 of file gc.c.

References gc_mark(), is_pointer_to_heap(), and VALUE.

Referenced by garbage_collect(), gc_mark_children(), rb_gc_mark_frame(), and rb_gc_mark_locations().

void mark_source_filename char *  f  )  [static]
 

Definition at line 537 of file gc.c.

Referenced by gc_mark_children(), and gc_sweep().

void mark_tbl st_table tbl,
int  lev
[static]
 

Definition at line 653 of file gc.c.

References mark_entry(), and st_foreach().

Referenced by garbage_collect(), gc_mark_children(), and rb_mark_tbl().

void obj_free VALUE   )  [static]
 

Definition at line 1137 of file gc.c.

References DATA_PTR, ELTS_SHARED, FL_EXIVAR, FL_TEST, free, nd_type, NODE_ALLOCA, NODE_SCOPE, RANY, rb_bug(), rb_clear_cache_by_class(), rb_free_generic_ivar(), rb_io_fptr_finalize(), re_free_pattern(), re_free_registers(), RUBY_CRITICAL, SCOPE_ALLOCA, SCOPE_MALLOC, st_free_table(), T_ARRAY, T_BIGNUM, T_BLKTAG, T_CLASS, T_DATA, T_FALSE, T_FILE, T_FIXNUM, T_FLOAT, T_HASH, T_ICLASS, T_MASK, T_MATCH, T_MODULE, T_NIL, T_NODE, T_OBJECT, T_REGEXP, T_SCOPE, T_STRING, T_STRUCT, T_TRUE, T_VARMAP, and VALUE.

Referenced by gc_sweep().

VALUE os_each_obj int  argc,
VALUE argv
[static]
 

Definition at line 1629 of file gc.c.

References os_live_obj(), os_obj_of(), rb_scan_args(), rb_secure(), and VALUE.

Referenced by Init_GC().

VALUE os_live_obj  )  [static]
 

Definition at line 1529 of file gc.c.

References RVALUE::as, FL_SINGLETON, FL_TEST, heaps, heaps_used, INT2FIX, heaps_slot::limit, rb_yield(), heaps_slot::slot, T_CLASS, T_ICLASS, T_NODE, T_SCOPE, T_VARMAP, TYPE, and VALUE.

Referenced by os_each_obj().

VALUE os_obj_of VALUE  of  )  [static]
 

Definition at line 1561 of file gc.c.

References RVALUE::as, FL_SINGLETON, FL_TEST, heaps, heaps_used, INT2FIX, heaps_slot::limit, rb_obj_is_kind_of(), rb_yield(), heaps_slot::slot, T_CLASS, T_ICLASS, T_NODE, T_SCOPE, T_VARMAP, TYPE, and VALUE.

Referenced by os_each_obj().

void rb_gc_finalize_deferred  ) 
 

Definition at line 1810 of file gc.c.

References deferred_final_list, finalize_list(), and free_unused_heaps().

Referenced by rb_call0(), and rb_gc().

void rb_gc_mark_frame struct FRAME frame  ) 
 

Definition at line 1263 of file gc.c.

References gc_mark(), mark_locations_array(), and VALUE.

Referenced by blk_mark(), and garbage_collect().

void rb_io_fptr_finalize struct OpenFile  ) 
 

void rb_mark_hash st_table tbl  ) 
 

Definition at line 689 of file gc.c.

References mark_hash().

void rb_mark_tbl st_table tbl  ) 
 

Definition at line 662 of file gc.c.

References mark_tbl().

Referenced by check_autoload_table(), and rb_autoload().

char* rb_source_filename char *  f  )  const
 

Definition at line 520 of file gc.c.

References ALLOC_N, MEMCPY, name, source_filenames, st_add_direct(), st_data_t, and st_lookup().

void re_free_registers struct re_registers  ) 
 

Definition at line 4433 of file regex.c.

VALUE rm_final VALUE  os,
VALUE  block
[static]
 

Definition at line 1666 of file gc.c.

References finalizers, rb_ary_delete(), rb_warn(), and VALUE.

Referenced by Init_GC().

void ruby_set_stack_size size_t  size  ) 
 

Definition at line 1439 of file gc.c.

References STACK_LEVEL_MAX, and VALUE.

void* ruby_xcalloc long  n,
long  size
 

Definition at line 134 of file gc.c.

References xmalloc.

void ruby_xfree void *  x  ) 
 

Definition at line 171 of file gc.c.

References free, and RUBY_CRITICAL.

void* ruby_xmalloc long  size  ) 
 

Definition at line 107 of file gc.c.

References garbage_collect(), malloc, malloc_increase, malloc_limit, rb_eNoMemError, rb_memerror(), rb_raise(), and RUBY_CRITICAL.

void* ruby_xrealloc void *  ptr,
long  size
 

Definition at line 146 of file gc.c.

References garbage_collect(), malloc_increase, rb_eArgError, rb_memerror(), rb_raise(), realloc, RUBY_CRITICAL, and xmalloc.

void run_final VALUE  obj  )  [static]
 

Definition at line 1781 of file gc.c.

References args, finalizer_table, finalizers, FIX2INT, Qtrue, RARRAY, rb_ary_new3(), rb_obj_id(), rb_protect(), rb_thread_critical, ruby_safe_level, run_single_final(), st_data_t, st_delete(), and VALUE.

void run_final  )  [static]
 

Referenced by finalize_list(), and rb_gc_call_finalizer_at_exit().

VALUE run_single_final VALUE args  )  [static]
 

Definition at line 1773 of file gc.c.

References args, Qnil, rb_eval_cmd(), and VALUE.

Referenced by run_final().

int sweep_source_filename char *  key,
char *  value
[static]
 

Definition at line 546 of file gc.c.

References free, ST_CONTINUE, and ST_DELETE.

Referenced by gc_sweep().

VALUE undefine_final VALUE  os,
VALUE  obj
[static]
 

Definition at line 1707 of file gc.c.

References finalizer_table, st_data_t, st_delete(), and VALUE.

Referenced by Init_GC().


Variable Documentation

RVALUE* deferred_final_list = 0 [static]
 

Definition at line 309 of file gc.c.

Referenced by gc_sweep(), rb_gc_call_finalizer_at_exit(), and rb_gc_finalize_deferred().

int dont_gc [static]