Source/Packages

Runtime.NativeResourcePlan

packages/execution/src/Runtime/NativeResourcePlan.alpha

299 lines21 declarations10.9 KiBSHA-256 596f7af6de64

def · lines 135–152

nativePhysicalInterpreterLease

Full file
One allocation is charged once, including holes/alignment and result/scratch storage. Frame and checkpoint residents are already inside the state extent: summing them again would double-charge the same physical pages. The conservative [0,1) epoch is the whole cooperating execution, not host time.
135def nativePhysicalInterpreterLease =
136  (lambda unrestricted identity : Bytes .
137    (lambda unrestricted endpoint : Nat .
138      (lambda unrestricted domain : Nat .
139        (lambda unrestricted quantum : Nat .
140          (lambda unrestricted program : (family NativePhysicalProgram) .
141            (stdResultBind
142              (family NativePhysicalMemoryFailure)
143              (family NativePhysicalMemoryLayout)
144              (family ResourceLease)
145              (nativePhysicalProgramMemory program)
146              (lambda unrestricted layout : (family NativePhysicalMemoryLayout) .
147                (nativeMemoryLease
148                  identity
149                  endpoint
150                  domain
151                  quantum
152                  (nativePhysicalMemoryBytes layout)))))))))

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.