MayaFlux 0.4.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 13 of file LiveArena.cpp.

14{
15 auto* hdr = internal::live_arena_header();
16 for (uint32_t i = 0; i < hdr->entry_count; ++i) {
17 auto& entry = hdr->entries[i];
18 if (!entry.occupied) {
19 continue;
20 }
21 if (std::strncmp(entry.key, key, internal::LIVE_ARENA_KEY_MAX) != 0) {
22 continue;
23 }
24 if (entry.offset == UINT32_MAX) {
25 return internal::g_live_arena_shared_ptrs[i].get();
26 }
27 return internal::live_arena_object_region() + entry.offset;
28 }
29 return nullptr;
30}

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: