M2Array stores a signed 32-bit self-relative offset. On x64 a separate heap block can lie more than 2 GB from m_data, so relocated low-priority .anim sequence data wrapped and crashed in ProcessEventCallbacks. Add OsAllocNear/OsFreeNear (Win64): reserve a block within 1.5 GB of an anchor. x64 now uses it for .anim buffers (load, cancel, destructor) and for the skin vertex overflow, which again follows the Win32 structure (m_flags |= 8, freed in ~CM2Shared). Texture combo arrays keep growing m_data. All new code is under WOWDECOMP_ARCH_64. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
12 lines
219 B
C
12 lines
219 B
C
#ifndef ENGINE_SOURCE_OS_OSMEMORY_H
|
|
#define ENGINE_SOURCE_OS_OSMEMORY_H
|
|
|
|
#include <cstddef>
|
|
|
|
#if defined(WOWDECOMP_ARCH_64)
|
|
void* OsAllocNear(const void* anchor, size_t size);
|
|
void OsFreeNear(void* ptr);
|
|
#endif
|
|
|
|
#endif
|