diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-18 22:24:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-18 22:24:19 -0700 |
commit | 0b11f11008362eafbce5b5211fc86766342f514a (patch) | |
tree | 2f0964b57c5607a4aa07ed8962068d986a6affe1 /configure | |
parent | fa14bd3eccbd211c16dc7ecc06d3132f9f9539a2 (diff) | |
download | txr-0b11f11008362eafbce5b5211fc86766342f514a.tar.gz txr-0b11f11008362eafbce5b5211fc86766342f514a.tar.bz2 txr-0b11f11008362eafbce5b5211fc86766342f514a.zip |
gc: small memory support.
* configure (small_mem): New variable. Provide help text and
show default value of --small-mem option. Generate
CONFIG_SMALL_MEM in config.h.
* gc.c (HEAP_SIZE, CHECKOBJ_VEC_SIZE, MUTOBJ_VEC_SIZE,
FULL_GC_INTERVAL, FRESHOBJ_VEC_SIZE, DFL_MALLOC_DELTA_THRESH):
Define conservative values of these constants if
CONFIG_SMALL_MEM is in effect.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -149,6 +149,7 @@ lit_align= extra_debugging= debug_support=y gen_gc=y +small_mem= have_dbl_decimal_dig= have_unistd= have_sys_stat= @@ -484,6 +485,14 @@ gen-gc [$gen_gc] When disabled, the garbage collector performs a full object traversal and sweep on each garbage collection. +small-mem [$small_mem] + + Use --small-mem to make the memory management use less memory, + for embedded systems with less RAM, at the possible cost of some + run-time penalty. Objects are allocated in smaller blocks, + and certain global book-keeping arrays in the generational garbage + collector are smaller, resulting in more frequent collections. + ! exit 1 fi @@ -3545,6 +3554,7 @@ $make conftest.clean [ -n "$debug_support" ] && printf "#define CONFIG_DEBUG_SUPPORT 1\n" >> config.h [ -n "$gen_gc" ] && printf "#define CONFIG_GEN_GC 1\n" >> config.h +[ "$small_mem" ] && printf "#define CONFIG_SMALL_MEM 1\n" >> config.h # # Regenerate config.make |