Subject: Incorrect File under Watcom directory
From: "Stephen Howe" <[email-masked]>
To: <[email-masked]>
Date: Wed, 30 Sep 1998 03:39:25 +0100

Hi

I provide support for Watcom C/C++ on the Sybase/Powersoft server as part of
Team Powersoft.

This is a good site with some fine collection of programming material.

One file drew my attention, that is MEMTEST.ZIP. The author states that
"memory is not
consolidated" after using new/delete for a C++ DOS4GW program. By this he
means that memory is not returned to the DPMI server.

In this, he is correct. Memory is returned to the heap manager (as it is for
all types of Watcom executables, Win16, Win32, DOS, OS/2 etc) waiting to be
recycled. This is documented.

However there is a function called _heapshrink() which if called will return
all free memory at the end of the heap back to the DPMI server or OS. This
achieves what the programmer wanted.

I tried contacting him but it seems he has graduated from the University of
Waterloo <g>.

Cheers

Stephen Howe [TeamPS] (In search of excellence)