Expand description
Shared memory allocator for the krypteia cryptographic workspace.
This crate provides a single GlobalAlloc that both arcana_ffi
and quantica_ffi use when running on targets without an OS
heap.
§Feature flags
| Feature | Behaviour |
|---|---|
os-alloc | The platform provides malloc/free. Init is a no-op. |
self-alloc | TLSF allocator over a caller-provided RAM block. |
Enable exactly one of the two features. os-alloc is the
default.
§Usage from C (bare-metal)
#include "krypteia.h"
static uint8_t heap[8192];
int main(void) {
krypteia_init(heap, sizeof(heap));
// … use arcana or quantica APIs …
}Structs§
- MemStats
- Memory allocation statistics.
Functions§
- krypteia_
init ⚠ - No-op when the OS provides its own allocator.
- memory_
stats - Returns zeroed stats in
os-allocmode (the OS tracks its own heap; we have no visibility).