I went back to the code and sure enough, what I missed was a call to check the availability of the win32k stuff (libWin32kInstalled) and when not present the usage of Dos16MemAvail API instead.
Now, having said that, while I can find some on-line references to Dos16MemAvail, I cannot for the life of me find actual documentation for this. Is that some kind of a macro maybe?
Some background at
https://svn.netlabs.org/repos/xworkplace/branches/branch-1-0/001/xwphelp2/xcenter/xc_mem.html , which says:
"Internally, this widget uses the Dos16MemAvail API, an old 16-bit API that is no longer documented by IBM.
The documentation for OS/2 1.3 says that this reports "the size of the largest block of free memory". This is obviously not true any more, since all 32-bit OS/2 versions (since 2.0) no longer allocate memory in blocks, but with 4 KB page granularity instead.
From my experience, this API now does indeed show the amount of free physical memory in the system, that is, the amount of RAM that is currently not used by OS/2, either because it has never been used or swapped out or released again by a process. (From my testing, this API returns the same values as Theseus does for the free physical RAM.) This free RAM can be used by applications immediately without &os2; having to make room by swapping out other memory pages."
More info can be found at
http://www.edm2.com/index.php/DosMemAvail which matches the information in the OS/2 1.3 "Control Program Programming Reference".