aboutsummaryrefslogtreecommitdiff
path: root/sys.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-08-21 21:53:09 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-08-21 21:53:09 +0100
commit85b83d7a203641639b440b6a164b4075e00e91a6 (patch)
tree27920124aa00e7c2e64190266692e8d1745d28d0 /sys.c
parented37f7cd80ce92a03ef3fccbbc3246addb29e2e1 (diff)
downloadalisp-85b83d7a203641639b440b6a164b4075e00e91a6.tar.gz
alisp-85b83d7a203641639b440b6a164b4075e00e91a6.tar.bz2
alisp-85b83d7a203641639b440b6a164b4075e00e91a6.zip
Small optimisation: don't initialise a symbol table immediately on init
Why? This way, until we use symbols, the system doesn't generate the table and thus grow the memory usage by a couple kb.
Diffstat (limited to 'sys.c')
-rw-r--r--sys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys.c b/sys.c
index ac26a88..d01b493 100644
--- a/sys.c
+++ b/sys.c
@@ -20,8 +20,7 @@
void sys_init(sys_t *sys)
{
- sys->memory = NIL;
- sym_table_init(&sys->symtable);
+ memset(sys, 0, sizeof(*sys));
}
void sys_register(sys_t *sys, lisp_t *ptr)