From 4b177a01a7f4e83f67af2200ec69505b75a3c399 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 19 Jun 2023 16:58:45 -0400 Subject: trie: Arena-allocate nodes and leaves --- src/trie.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/trie.h') diff --git a/src/trie.h b/src/trie.h index 6bd211e..6921f62 100644 --- a/src/trie.h +++ b/src/trie.h @@ -5,6 +5,7 @@ #define BFS_TRIE_H #include "config.h" +#include "alloc.h" #include #include @@ -30,6 +31,10 @@ struct trie { uintptr_t root; /** Linked list of leaves. */ struct trie_leaf *head, *tail; + /** Node allocator. */ + struct varena nodes; + /** Leaf allocator. */ + struct varena leaves; }; /** -- cgit v1.2.3