From da11070351141256bbe99cbda18fea6929388daf Mon Sep 17 00:00:00 2001 From: Taylan Kammer Date: Sun, 23 Aug 2026 18:05:46 +0200 Subject: More fixes to latest note. --- notes/260822-release3.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/notes/260822-release3.md b/notes/260822-release3.md index a9277d1..54b4de8 100644 --- a/notes/260822-release3.md +++ b/notes/260822-release3.md @@ -177,6 +177,9 @@ the pointers 1234, 1256, 7800, and 7855 stored in it: 7855 -> [ ] // Level 3 +*Late clarification: Root cannot a pointer to a slot; the first level +must be a statically allocated array.* + As you can see, the pointer 1234 is both stored in the root node as data, and happens to point to a node which can hold further pointers sharing the same first word with it. @@ -277,6 +280,13 @@ So, we do the following loop: 4. Continue the search to find the next non-NULL pointer; it's the start of the next span. Go to step 2. +Note that, if we were to call `madvise(DONTNEED)` immediately after +creating a vacancy-list entry, we could inadvertently erase memory +that's still used to hold portions of the trie. So, instead, count +how many vacancy-list entries were added, and walk through the list +when we're finished, performing the required `madvise` calls on the +new entries that were pushed to the top of the list. + ### Will I add it to Meta Alloc? -- cgit v1.2.3