abla/runtime/memory
Generated from source.
Import with import "abla/runtime/memory".
Source: abla/runtime/memory/entry.ab
runtimeMemoryCheckpoint (fun)
fun runtimeMemoryCheckpoint(): int
Allocation generations are normal runtime functions. Only the raw loads, stores, pointer conversions, and allocator system calls are intrinsic or platform boundaries.
runtimeMemoryReset (fun)
fun runtimeMemoryReset(checkpoint: int)
Frees allocations made after a valid checkpoint and traps if that checkpoint cannot be reached.
runtimeMemoryLiveBytes (fun)
fun runtimeMemoryLiveBytes(): int
Returns the number of bytes currently tracked as live by the runtime allocator.
runtimeMemoryLimit (fun)
fun runtimeMemoryLimit(): int
Returns the runtime allocator's effective live-byte limit.
runtimeMemorySetLimit (fun)
fun runtimeMemorySetLimit(limit: int)
Sets the byte limit and enables pressure-based collection, trapping when the limit is below live usage or outside the platform's range.
runtimeMemorySetCollectionGrowth (fun)
fun runtimeMemorySetCollectionGrowth(bytes: int)
Enables pressure-based collection with the requested heap growth step and traps for a nonpositive step.
runtimeMemorySetFreeBlockLimit (fun)
fun runtimeMemorySetFreeBlockLimit(bytes: int)
Caps the host's retained free-block bytes and traps for a negative limit.
runtimeMemorySetStress (fun)
fun runtimeMemorySetStress(on: bool): void
Enables or disables stress collection at host safe points.
runtimeMemorySetStressStride (fun)
fun runtimeMemorySetStressStride(stride: int): void
Under stress, collects at every stride-th safe point only (1: every one).
runtimeMemorySetTrace (fun)
fun runtimeMemorySetTrace(on: bool): void
Enables or disables the host collector's diagnostic trace.
runtimeMemorySetManualCollection (fun)
fun runtimeMemorySetManualCollection()
Disables pressure-triggered collection until a later limit or growth setting re-enables it.
runtimeMemorySetBackgroundFree (fun)
fun runtimeMemorySetBackgroundFree(enabled: bool)
Enables or disables host background freeing of garbage identified by a collection.
runtimeMemorySetGcWorkers (fun)
fun runtimeMemorySetGcWorkers(count: int)
The collection's threads when the program's environment does not say (ABLA_GC_WORKERS, set to anything, wins: 0 or 1 is the serial collector). Only the collection with background freeing uses them.
runtimeMemoryDebugHold (fun)
fun runtimeMemoryDebugHold(mode: int): int
Controls the host collector's test hold, with zero releasing it, one arming it, and other values returning whether a thread is held.
runtimeMemoryHeapStat (fun)
fun runtimeMemoryHeapStat(which: int): int
Returns the platform-defined heap statistic for selector which, or zero for an unsupported selector.
runtimeMemoryCollect (fun)
fun runtimeMemoryCollect(): int
Runs one collection and returns reclaimed bytes, or zero if collection is deferred or reclaims nothing.
runtimeMemoryRelease (fun)
fun runtimeMemoryRelease(): void
Hands the heap's free memory back to the system, as far as the platform can (a no-op where the C library's allocator holds it: malloc_trim is the caller's). The program's own objects stay.
runtimeMemoryCensus (fun)
fun runtimeMemoryCensus(): array<int>
The census's words (see __ablaRuntimeMemoryCensusWords), read after the platform's walk, so the array holding them is not counted.
runtimeMemoryRegionActive (fun)
fun runtimeMemoryRegionActive(): bool
Whether a region { … } is active: what is allocated now is freed when it ends, so a cache kept beyond the current call must not hold it.
runtimeMemoryPromoteString (fun)
trusted fun runtimeMemoryPromoteString(value: string): string
Returns a copy that outlives the active allocation region, or the original string when no region is active.
runtimeMemoryEnableSharing (fun)
fun runtimeMemoryEnableSharing(): void
Makes the runtime's heap lock live. A thread the runtime did not start (a JIT-compiled program's, calling abla/runtime/emutls in the compiler's image) allocates from this heap too; call it while the process has one thread.
Frozen (class)
@__abla_runtime_value("__ablaRuntimeFrozenCreate get:__ablaRuntimeFrozenGet")
class Frozen<T: __abla_not_resource>(value: T)
A copy of a value and everything it reaches, in read-only memory the collector does not trace (docs/design/frozen-heap.md): for what is built whole and then only read (the editor's module caches). Frozen(value).get() is the copy; a store into it faults. A value that is not a heap reference (a number) is returned as it is. Runtime-private for now.
Frozen.get (method)
fun get(): T
Returns the frozen read-only copy, or the original value for a non-reference scalar.
runtimeNativeEnter (fun)
trusted fun runtimeNativeEnter(): void
The calling thread runs code this runtime does not manage (a JIT-compiled program, whose runtime is its own, on a thread of the compiler's: ablac run --watch and ablac repl run its main so): a stop for a collection counts it as parked until runtimeNativeLeave, so the compiler collects while the program runs.
runtimeNativeLeave (fun)
trusted fun runtimeNativeLeave(): bool
Back to this runtime's code from such a thread (a compiler export the program calls): true when it was in native code, and then runtimeNativeEnter before returning to the program.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.