summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index a2bb9dd2..b9239d9c 100644
--- a/txr.c
+++ b/txr.c
@@ -129,6 +129,8 @@ static void help(void)
" section at the bottom of the license.\n"
"--lisp-bindings Synonym for -l\n"
"--debugger Synonym for -d\n"
+"--gc-delta=N Invoke garbage collection when malloc activity\n"
+" increments by N megabytes since last collection.\n"
"\n"
"Options that take no argument can be combined. The -q and -v options\n"
"are mutually exclusive; the right-most one dominates.\n"
@@ -356,6 +358,13 @@ int txr_main(int argc, char **argv)
continue;
}
+ if (match_str(arg, lit("--gc-delta="), zero)) {
+ val megs = mul(int_str(sub(arg, num_fast(11), t), num_fast(10)),
+ num_fast(1048576));
+ opt_gc_delta = c_num(megs);
+ continue;
+ }
+
if (equal(arg, lit("--version"))) {
format(std_output, lit("~a: version ~a\n"),
prog_string, auto_str(version), nao);