upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/loader_test.cpp
diff options
context:
space:
mode:
authorjsthope <68657498+jsthope@users.noreply.github.com>2026-11-22 20:09:00 +0100
committerjsthope <68657498+jsthope@users.noreply.github.com>2026-11-22 20:09:00 +0100
commit111b634c21e6fd9e4e05d1d878ba473ddbcfd091 (patch)
treed4cbcec9ecf8139cb1e09e78a19d48cb434ac5b9 /runtime/test/loader_test.cpp
parentdf1ae87efe2045dedeca9ad4ff1a211eba2631b0 (diff)
runtime: BufferVaIndex's longest-range bound follows the live ranges
The bound that stops a lookup's walk only grew: once a large buffer was freed, every later miss still walked back as far as that buffer had reached. With 20 000 buffers of 256 bytes, a 1 GiB range added then removed left a miss past the last buffer at 250-600 us instead of ~50 ns (found by @padhossein in review of #2823). A multiset of the indexed sizes keeps the bound at the longest range indexed now; insert and erase stay O(log n), find is unchanged. Inserting the same (va, id) again replaces its size instead of leaving the old one in the bound. buffer_va_index_test checks the bound after erases (same sizes and a smaller re-registration included), against the longest live range in all 200 random tables, and times the review's miss-after-free case.
Diffstat (limited to 'runtime/test/loader_test.cpp')
0 files changed, 0 insertions, 0 deletions