refactor(fspy-shared): make the channel allocator-generic - #673
Draft
wan9chi wants to merge 1 commit into
Draft
Conversation
fspy benchmarklinuxmacoswindows |
channel(), Receiver, and sender() are now generic over an allocator-api2 allocator instead of hardcoding the global allocator and an internal pooled bump: - channel() threads the caller's allocator through the shared-memory backing path and the ShmKeeper; the supervisor instantiates with Global. - sender() takes the allocator for its transient shm-path decode from the caller, so the choice of preload-safe memory — the preloads pass a pooled bump — lives at the call site instead of inside fspy_shared. - The lock file path is now generated absolute: temp_dir() reflects TMPDIR verbatim, which may be relative, and the path travels to processes with other working directories. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wan9chi
force-pushed
the
agent/fspy-alloc-generic-channel
branch
from
August 14, 2026 08:04
e67af66 to
a1a77c5
Compare
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.
Motivation
The end goal is a fully std-free preload, and fspy_shared hardcoding its allocators stands in the way:
channel()built its C strings with the global allocator, andsender()reached for a pooled bump internally — an infrastructure crate deciding what memory its callers should use.channel(),Receiver, andsender()are now generic over an allocator-api2 allocator. The supervisor instantiates withGlobal; the preloads passsender()a pooled bump at the call site, keeping the choice of preload-safe memory where the constraint lives. This also sets up the payload-view PR on top, where the preload's allocator choice becomes load-bearing for payload lifetimes.The lock file path is also generated absolute now:
temp_dir()reflectsTMPDIRverbatim, which may be relative, and the path travels to processes with other working directories — fixing a latent relative-TMPDIRhazard the shm backing path already handled.🤖 Generated with Claude Code