MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ live_cast_impl()

MAYAFLUX_API void * MayaFlux::live_cast_impl ( const char *  key)
noexcept

Internal implementation for live_cast.

Resolves through the export table so JIT'd code can reach arena globals across DLL boundaries.

Parameters
keyNull-terminated arena key.
Returns
Raw pointer to the registered object, or nullptr.

Definition at line 25 of file LiveArena.cpp.

26{
27 auto* hdr = internal::live_arena_header();
28 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
29 auto& entry = hdr->entries[i];
30 if (!entry.occupied) {
31 continue;
32 }
33 if (std::strncmp(entry.key, key, internal::LIVE_ARENA_KEY_MAX) != 0) {
34 continue;
35 }
36 if (entry.offset == UINT32_MAX) {
37 return internal::g_live_arena_shared_ptrs[i].get();
38 }
39 return internal::live_arena_object_region() + entry.offset;
40 }
41 return nullptr;
42}

References MayaFlux::internal::g_live_arena_shared_ptrs, MayaFlux::internal::live_arena_header(), MayaFlux::internal::LIVE_ARENA_KEY_MAX, and MayaFlux::internal::live_arena_object_region().

Referenced by live_cast().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: