Allocating an empty Fibonacci heap in already-zero memory #
The word RAM's input convention is zero beyond the input. Under Memory.ZeroAbove, the
existing Fibonacci-heap layout therefore needs no clearing: one Memory.allocDirty query
reserves its 9 n + 5 cells and establishes the existing framed refinement at the empty queue.
Previously allocated cells are unchanged. This is an oracle-cost certificate; a native
realization must additionally charge address arithmetic, argument preparation and control.
Main definitions #
zeroAllocator: the existing memory allocator interface, withZeroAboveas precondition and one memory unit of allocation cost.
Main results #
framed_allocDirty: already-zero fresh cells establish the existing empty-heap frame.
No new heap representation or execution interface is introduced. This specialized allocator uses the existing frame and source methods; an allocator that accepts arbitrary fresh contents must still establish the representation, for example by clearing its storage.
Reserving fresh storage without clearing it establishes the existing empty-heap frame when memory is already zero above the old frontier.
Allocate an empty indexed Fibonacci heap by reserving its already-zero storage. The precondition is explicit, and neither the returned base nor the cell count is a native timing claim. The existing memory methods and framed refinement are retained.