add assignment operator and unify memory pools

The unification of memory pools also fixed some memory leaks and
hopefully reduced the mallocs of identifier strings significantly by
giving them the same pool as the token stream.
This commit is contained in:
r4
2021-12-21 11:40:49 +01:00
parent 21694f98ac
commit 63af3e907b
11 changed files with 121 additions and 48 deletions

View File

@@ -24,10 +24,16 @@ map_test: map_test.c util.c map.c
run_map_test: map_test
valgrind ./map_test
pool_test: pool_test.c util.c
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
run_pool_test: pool_test
valgrind ./pool_test
.PHONY: clean
clean:
rm -f $(OBJ) $(EXE) deps.mk gmon.out map_test
rm -f $(OBJ) $(EXE) deps.mk gmon.out map_test pool_test
ifneq ($(MAKECMDGOALS),clean)
include deps.mk