Open X547 opened 4 years ago
There are also other issues such as improper heap object flags, failure of local heap detection.
The winevdm global heap isn't compatible with the win31 global heap. Many heap objects are shown and viewable so heap walking works even if somewhat differently. The watcom source is available so the flags might be able to be added if what heap walk expects were determined.
NTVDM from Windows 8.1 also works fine. Issue can be fixed by skipping entries with zero pArena->base
in GlobalNext16. GLOBAL_FREE handling is also wrong, it should return free memory blocks with non-zero size and GT_FREE block type, not empty table entries.
This is documented behavior and other debugging utilities also depend on this behavior.
Toolhelp documentation is available in "Windows 3.1 reference guide" by Borland.
Version: otvdm-master-1861
wheapwlk.exe
is a part of OpenWatcom package, sources available. OpenWatcom can be downloaded at http://www.openwatcom.org/download.php.stress.dll
is required to run.As can be visible at screenshot, a lot of empty global heap entries are displayed. Is slow down list refreshing a lot. Issue is not present in Windows 3.11 in DosBox. Issue is likely caused by inaccurate heap walk API (https://github.com/otya128/winevdm/blob/master/toolhelp/toolhelp.c). There are also other issues such as improper heap object flags, failure of local heap detection.
This tool is useful to understand and debug inner workings of Win16 runtime environment and it will be nice no make it work properly.