Skip to content

Commit

Permalink
allow turning off GC generational mode by default by MRB_GC_TURN_OFF_…
Browse files Browse the repository at this point in the history
…GENERATIONAL; #1447
  • Loading branch information
matz committed Aug 8, 2013
1 parent 3b2b760 commit 1e87bf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/mrbconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
/* initial size for IREP array */
//#define MRB_IREP_ARRAY_INIT_SIZE (256u)

/* turn off generational GC by default */
//#define MRB_GC_TURN_OFF_GENERATIONAL

/* default size of khash table bucket */
//#define KHASH_DEFAULT_SIZE 32

Expand Down
2 changes: 2 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ mrb_init_heap(mrb_state *mrb)
add_heap(mrb);
mrb->gc_interval_ratio = DEFAULT_GC_INTERVAL_RATIO;
mrb->gc_step_ratio = DEFAULT_GC_STEP_RATIO;
#ifndef MRB_GC_TURN_OFF_GENERATIONAL
mrb->is_generational_gc_mode = TRUE;
mrb->gc_full = TRUE;
#endif

#ifdef GC_PROFILE
program_invoke_time = gettimeofday_time();
Expand Down

0 comments on commit 1e87bf6

Please sign in to comment.