refactor(fspy-shared): make the channel allocator-generic - #673
Draft
wan9chi wants to merge 1 commit into
Draft
Conversation
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
agent/fspy-alloc-generic-channel
branch
from
August 14, 2026 08:04
e67af66 to
a1a77c5
Compare
wan9chi
force-pushed
the
agent/fspy-alloc-generic-channel
branch
from
August 18, 2026 03:43
a1a77c5 to
7ff65af
Compare
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, and the client constructors pass it through from the top of the call stack — the preload ctor and DllMain — so the choice of preload-safe memory lives where the attach begins, not inside library code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wan9chi
force-pushed
the
agent/fspy-alloc-generic-channel
branch
from
August 18, 2026 09:13
7ff65af to
d362c5f
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; on the preload side the allocator is passed down from the top of the call stack —Client::from_envandClient::from_payload_bytesaccept it, and the preload ctor / DllMain pass a pooled bump — so the choice of preload-safe memory lives where the attach begins, not inside library code. This also sets up the payload-view PR on top, where the allocator the client borrows becomes load-bearing for payload lifetimes.🤖 Generated with Claude Code