50
« on: January 01, 2025, 07:30:49 pm »
OK, as far as I understand it, there are 2 ways that high memory is used. Loading the DLL/EXE code and/or data segment into high memory when the object is loaded. Loading the code high is usually safe as long as no 16 bit code, data high varies. I remember with Mozilla experimenting, it was weird, one version would work fine with both loaded, another version would be crashy with the data loaded high. Sometimes you have to experiment, or just stick with loading code high.
The other way is when allocating memory, pass the flag OBJ_ANY to DosAllocMem() etc and memory will be allocated in the high arena if possible. With GCC, there's the -Zhigh-mem parameter that automates this as well as os2safe.h (now automatically included) which has workarounds for the 16 bit API functions.
For this, if you don't have access to the source, or at least the build flags in the case of GCC, I guess using something like Theseus to look at where the memory is allocated is about the only way to check.