Repository navigation
perf(lite): bound read allocations and fix shared-library exports - #1022
Merged
Merged
Conversation
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repeated local reads decoded and copied the same payloads, and duplicate result pins exhausted the owner budget even when they referred to one block. Impossible cache admissions could also evict useful blocks, and a compressed-prefix key miss caused a second block load. This follow-up to #1018 fixes those paths and bounds decoder working memory while preserving ordinary point-read ownership.
It also fixes #1023: libantfly exported internal symbols, including
__dso_handle, causing aws-lc consumers to fail their direct constructor relocations. Shared-library exports now come from the public C header, with exact allowlists for Mach-O and ELF.Changes:
lsm.read_working_setresource slice, keeping existing resource IDs stable. Cache admission atomically transfers credit to the cache slice without a second host charge. Final result release returns evicted payload credit; a nonblocking reclaimer and shutdown fence preserve callback lifetime.antfly.hand verify both leaked internals and missing public functions. macOS links the C API archive and its provider archives with an exported-symbol list; native builds use Apple ld and cross builds use ld64.lld (overridable with-Dmacos-linker). Preserve SDK, deployment version, frameworks, runtime paths, header padding, and ad-hoc signing. ELF uses an exact version script. Windows retains its original artifact/import-library handling.arm64_adrp_lo12failure against the unrestricted Zig dylib. Add policy/linkage tests to CI and LLVM inspection tools to release builders.Measurements on aarch64 macOS, Debug, with deterministic fixtures:
1ad9a16b18: backend allocations 206 → 0 and owned values 200 → 0, with one retained block pin and no additional writer scratch allocations after warmup.Backend allocation counts exclude caller-owned point results and runtime metadata supplied by its separate allocator; writer scratch reuse is checked separately. Encoded loads may hit provider memory caches. These are allocation/lifetime fixtures, not a query-throughput or 2 GiB soak benchmark. Results and policy bounds are recorded in
zig/bench/baselines/lite-decoded-cache-budget.json.Validation:
origin/mainwas already integrated at84dfbf5a95. The on-disk format and header-declared C ABI are unchanged. Undocumented internal functions are no longer exported.Fixes #1023.