Source/Packages

Checkpoint.NativeRegions

packages/execution/persistence/src/Checkpoint/NativeRegions.alpha

901 lines47 declarations40.2 KiBSHA-256 9e8fb104ae0c

def · lines 867–901

nativeRegionPrepareShard

Full file
Serialize one quiescent, admitted source fragment through the same durable envelope owner used by restore. Source/capture are caller-owned host regions; they must be disjoint from this layout's private staging. Extents are derived from the logical shard, never from a peer-provided byte count.
867def nativeRegionPrepareShard =
868  (lambda unrestricted shard : (family NativeRegionShard) .
869    (lambda unrestricted capture : (family NativePhysicalOperand) .
870      (lambda unrestricted source : (family NativePhysicalOperand) .
871        (lambda unrestricted candidate : (family NativePhysicalOperand) .
872          (lambda unrestricted committed : (family NativePhysicalOperand) .
873            (lambda unrestricted directory : (family NativePhysicalOperand) .
874              (lambda unrestricted descriptor : Nat .
875                (lambda unrestricted scratch : Nat .
876                  (lambda unrestricted tail : (family NativePhysicalCommands) .
877                    (let unrestricted layout =
878                      (nativeRegionLayout shard)
879                      in
880                      (nativeMemoryCopyOperands
881                        (nativeMemoryState (nativeCheckpointPayloadAt layout))
882                        capture
883                        nativeRegionCaptureBytes
884                        scratch
885                        b"checkpoint-shard-capture"
886                        (nativeMemoryCopyOperands
887                          (nativeMemoryState
888                            (naturalAdd (nativeCheckpointPayloadAt layout) nativeRegionCaptureBytes))
889                          source
890                          (intervalExtent (nativeRegionInterval shard))
891                          scratch
892                          b"checkpoint-shard-state"
893                          (nativeCheckpointPublish
894                            layout
895                            candidate
896                            committed
897                            directory
898                            descriptor
899                            scratch
900                            6
901                            tail)))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.