W Wrapl, The Programming Language

Libraries Sys.Memory

Types

WeakRefT

Functions

Alloc(size @ Std.Integer.SmallT) : Std.Address.T

Allocates and returns the address of size bytes of memory in the heap.

AllocAtomic(size @ Std.Integer.SmallT) : Std.Address.T

Allocates and returns the address of size bytes of pointer free memory in the heap.

AllocUncollectable(size @ Std.Integer.SmallT) : Std.Address.T

Allocates and returns the address of size bytes of uncollectable memory in the heap.

Collect()

Causes a garbage collection cycle.

GCEnabled()

IsVisible(address @ Std.Address.T)

RegisterFinalizer(address @ Std.Address.T, finalizer @ Std.Function.T, data @ ANY = NIL)

Attaches a finalizer to address. I.e. finalizer(address, data) should be called at some stage after address becomes unreachable.

RegisterObjectFinalizer(object @ ANY, finalizer @ Std.Function.T, data @ ANY = NIL)

Attaches a finalizer to object. I.e. finalizer(object) should be called at some stage after object becomes unreachable.

WeakRefGet()

WeakRefNew(object @ ANY)

Returns a weak reference to object.

Methods

:get(_ @ WeakRefT)