Commit 7faaca5
C: Fix O(n) linked list walk in
This PR changes the way we add pages in the arena allocator, instead of
seeking to the tail page starting from the head, we directly use the
tail page.
Additionally this PR asserts that if the head page is null, the tail
page also should be null.
---------
Co-authored-by: Michael Kohl <me@citizen428.net>hb_arena_append_page() (#1380)1 parent f037dbb commit 7faaca5
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 78 | + | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
| |||
0 commit comments