From 2c43d65c7db47f2b682b8924669b8e6aef22ec0a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Jan 2021 19:43:30 -0800 Subject: Made all the heap garbage collection code optional, which saves some time and memory. --- vm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm.h') diff --git a/vm.h b/vm.h index 3e7526b..3777492 100644 --- a/vm.h +++ b/vm.h @@ -15,10 +15,12 @@ match_t *get_capture(match_t *m, const char **id); __attribute__((nonnull)) void destroy_op(vm_op_t *op); match_t *new_match(void); -size_t free_all_matches(void); __attribute__((nonnull)) void recycle_if_unused(match_t **at_m); +#ifdef DEBUG_HEAP +size_t free_all_matches(void); size_t recycle_all_matches(void); +#endif #endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 -- cgit v1.2.3