16 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
17 auto& entry = hdr->entries[i];
18 if (!entry.occupied) {
24 if (entry.offset == UINT32_MAX) {
35 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
36 auto& entry = hdr->entries[i];
37 fprintf(stderr,
"[LiveArena] %u: key=\"%s\" occupied=%d offset=%u\n",
38 i, entry.key, (
int)entry.occupied, entry.offset);
40 fprintf(stderr,
"[LiveArena] entry_count=%u bump=%u\n",
constexpr std::size_t LIVE_ARENA_KEY_MAX
Maximum length of a live arena key, including null terminator.
constexpr std::size_t LIVE_ARENA_MAX_ENTRIES
Maximum number of objects that can be registered in the live arena.
uint32_t g_live_arena_bump
Byte offset of the bump pointer from the start of the object region.
constexpr std::size_t LIVE_ARENA_CAPACITY
Default capacity of the live arena in bytes.
LiveArenaHeader * live_arena_header() noexcept
Returns a pointer to the header block at the start of arena storage.
unsigned char * live_arena_object_region() noexcept
Returns a pointer to the object region (immediately after the header).
unsigned char g_live_arena_storage[LIVE_ARENA_CAPACITY]
Raw backing storage for the live arena with external linkage.
std::shared_ptr< void > g_live_arena_shared_ptrs[LIVE_ARENA_MAX_ENTRIES]
Shared ownership table for objects registered via expose_live.
MAYAFLUX_API void * live_cast_impl(const char *key) noexcept
Internal implementation for live_cast.
MAYAFLUX_API void live_arena_dump() noexcept
Dumps all live arena entries to stderr.
Main namespace for the Maya Flux audio engine.