No Owners Shown In Report

Where XMSWATCH describes the chain of XMS handlers, each handler is supposed to be described not only by the address of its entry point but also by naming the program or driver that contains this entry point. The code that finds this name is the function named GetMemoryOwner in the MEMOWNER.C source file from Chapter 14. If XMSWATCH is resident, this same function is also used to find a name for any program that is observed to ask for extended memory. The code and everything that it uses must therefore be allocated to the resident segments.

Under the constraints of the old C compiler that was contemporaneous with DOS Internals, allocation to resident segments was arranged by compiling with particular /ND and /NT command-line switches. This was set up for MEMOWNER.C in the MAKEFILE for XMSWATCH. What was neglected however was that MEMOWNER.C gets the operating system version from a variable, which needs also to be resident. In the particular way that MEMOWNER.C was coded, the version variable will be resident only if the source file is compiled with the symbol _MANUAL_UMBLINK_ defined. Without this done, XMSWATCH reads a byte that may have nothing to do with XMSWATCH, but the only harm seems to be that there may be no Owner cited anywhere in the reports.

The dependence on that symbol looks to be an artefact of cutting and pasting from related code in Chapter 4, which itself looks like it ought to have avoided this dependence. It could certainly be improved on, but the easiest remedy is to define the symbol at compile-time. This means replacing two files in the XMS\XMSWATCH directory of the DOS Internals disk, namely the MAKEFILE and the built executable. For distribution, these two files are compressed into one: download the corrected XMSWATCH.