summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-03-18 22:24:19 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-03-18 22:24:19 -0700
commit0b11f11008362eafbce5b5211fc86766342f514a (patch)
tree2f0964b57c5607a4aa07ed8962068d986a6affe1 /configure
parentfa14bd3eccbd211c16dc7ecc06d3132f9f9539a2 (diff)
downloadtxr-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-xconfigure10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure b/configure
index fad3da0c..a32f5306 100755
--- a/configure
+++ b/configure
@@ -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