Crate koto_memory

Source
Expand description

Memory management utilities for Koto

Currently, only reference-counted pointers without cycle detection are implemented. The intent is that this crate can be expanded in the future with implementations of Ptr and PtrMut that offer alternative memory management strategies.

Making custom GC types that support trait objects or other DSTs is currently only possible with nightly Rust, while the stabilization of DST custom coercions is pending

Until then, GC implementations for Ptr/PtrMut could be introduced with a nightly-only feature.

Macros§

make_ptr
Makes a Ptr, with support for casting to trait objects
make_ptr_mut
Makes a PtrMut, with support for casting to trait objects

Structs§

Address
A wrapper for comparing and hashing pointer addresses
Borrow
An immutably borrowed reference to a value borrowed from a PtrMut
BorrowMut
A mutably borrowed reference to a value borrowed from a PtrMut
KCell
A mutable value with borrowing checked at runtime
Ptr
An immutable pointer to a value in allocated memory

Type Aliases§

PtrMut
A mutable pointer to a value in allocated memory