Skip to content

Accept raw allocation sequences and streamline the public API#46

Merged
fpedd merged 1 commit into
mainfrom
public-api-polish
Jul 21, 2026
Merged

Accept raw allocation sequences and streamline the public API#46
fpedd merged 1 commit into
mainfrom
public-api-polish

Conversation

@fpedd

@fpedd fpedd commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Let every public entry point (allocate, validate_allocation,
save_allocation, plot_allocation) accept a raw Sequence[Allocation] in
addition to System/Memory/Pool, wrapped via the new
Pool.from_allocations; allocate returns the placed allocations as a
tuple in input order. Pool.allocate now restores the pool's input order
after allocator-internal reordering so positions keep corresponding to
the request, and checks the returned set by length as well as ids.

Rename Memory.capacity to Memory.size (validation message follows), and
rename the analysis functions pressure/pressure_per_allocation to
antichain_pressure/antichain_pressure_per_allocation, keeping the old
names exported as aliases for the canonical default metric.

Drop the keyword-only markers from allocator constructors, Timer, and
plot_allocation so the common single-argument calls read naturally. Add
any_allocated across Pool/Memory/System and use it in io. Add nanobind
to the dev dependency group.

Let every public entry point (allocate, validate_allocation,
save_allocation, plot_allocation) accept a raw Sequence[Allocation] in
addition to System/Memory/Pool, wrapped via the new
Pool.from_allocations; allocate returns the placed allocations as a
tuple in input order. Pool.allocate now restores the pool's input order
after allocator-internal reordering so positions keep corresponding to
the request, and checks the returned set by length as well as ids.

Rename Memory.capacity to Memory.size (validation message follows), and
rename the analysis functions pressure/pressure_per_allocation to
antichain_pressure/antichain_pressure_per_allocation, keeping the old
names exported as aliases for the canonical default metric.

Drop the keyword-only markers from allocator constructors, Timer, and
plot_allocation so the common single-argument calls read naturally. Add
any_allocated across Pool/Memory/System and use it in io. Add nanobind
to the dev dependency group.
@fpedd
fpedd merged commit 5e3afb1 into main Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant