Expand description
Runtime memory accounting.
The accounting is intentionally explicit:
- allocations are charged when capacity is acquired;
- replacements release the old allocation;
Dropreleases the final allocation;- failed reservations never modify the current value.
Order for overwrite (S3):
reserve(new) → liberar old → instalar newNever install before releasing the previous charge.
Structs§
- Heap
Bytes - Opaque byte buffer charged against a
MemoryBudget. - HeapStr
- UTF-8 heap buffer charged against a
MemoryBudget. - Memory
Budget - Process- or scope-wide byte budget with atomic charge/release.
- Memory
Limit - Hard ceiling for a
MemoryBudget. - Memory
Snapshot - Point-in-time view of a budget (read-only observability).
Enums§
- Memory
Error - Fail-closed memory reservation error.