diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-06-19 16:58:45 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-06-20 14:26:09 -0400 |
commit | 4b177a01a7f4e83f67af2200ec69505b75a3c399 (patch) | |
tree | 576028dbd29a0eae452ecd6b7de929de211a6d64 /src/trie.h | |
parent | 1649d37f7c88f8a5930fdd4c1ff1b59212da90ee (diff) | |
download | bfs-4b177a01a7f4e83f67af2200ec69505b75a3c399.tar.xz |
trie: Arena-allocate nodes and leaves
Diffstat (limited to 'src/trie.h')
-rw-r--r-- | src/trie.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,7 @@ #define BFS_TRIE_H #include "config.h" +#include "alloc.h" #include <stddef.h> #include <stdint.h> @@ -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; }; /** |