ValidateFreeSpaces(), GlobalCompact(), and Wild PointersLast reviewed: July 22, 1997Article ID: Q32680 |
3.00 3.10
WINDOWS
kbprg docerr
The information in this article applies to:
SUMMARYThe ValidateFreeSpaces() function does not work as documented on page 4-454 of the "Microsoft Windows Software Development Kit Reference Volume 1" for version 3.0. On page 964 of the "Programmer's Reference, Volume 2: Functions" manual from the Windows 3.1 SDK, the ValidateFreeSpaces() function is correctly documented.
MORE INFORMATIONValidateFreeSpaces() returns a void, not a LPSTR, as documented. Under the debugging kernel, ValidateFreeSpaces() will RIP if it finds overwritten free space; under the retail kernel, it does nothing. To use ValidateFreeSpaces(), the WIN.INI file must include the following statements:
[KERNEL] EnableHeapChecking=1 EnableFreeChecking=1If an application calls ValidateFreeSpaces() and it discovers an error, it will RIP with a fatal exit code of 0x00ff, "FREE MEMORY OVERWRITE AT," and the address of the byte that was overwritten as Segment:Offset. To build a fairly solid detector of wild pointers, an application writer can use the following statements in the [KERNEL] section:
Please note the following:
|
Additional reference words: 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |