28 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
29 auto& entry = hdr->entries[i];
30 if (!entry.occupied) {
36 if (entry.offset == UINT32_MAX) {
47 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
48 auto& entry = hdr->entries[i];
49 fprintf(stderr,
"[LiveArena] %u: key=\"%s\" occupied=%d offset=%u\n",
50 i, entry.key, (
int)entry.occupied, entry.offset);
52 fprintf(stderr,
"[LiveArena] entry_count=%u bump=%u\n",
void enable_live_exposure() noexcept
Turns on exposure for the MF_LIVE_EXPOSE macros in the linked library.
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.
bool live_exposure_enabled() noexcept
Reports whether live exposure has been enabled.
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).
std::atomic< bool > g_live_exposure_enabled
Whether the MF_LIVE_EXPOSE macros publish objects to the arena.
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.