Virtual Memory Routines Use Far Heap

Last reviewed: July 22, 1997
Article ID: Q117781
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

  • The C Run-time (CRT), included with:

        - Microsoft C/C++ for MS-DOS, version 7.0
        - Microsoft Visual C++ for Windows, versions 1.0 and 1.5
    

The virtual memory functions in the Microsoft C Run Time libraries always use a far heap for managing internal information. The far heap is used for keeping a log of free memory blocks and consists of a series of 12-byte blocks.

If you are analyzing heap use with _heapwalk() in a small- or medium- memory model application, this information is hidden. However, _fheapwalk() correctly reports use of the far heap.

Using _vheapterm() to terminate the virtual memory manager frees any memory allocated for the virtual memory manager; therefore, the far heap is freed for applications that have a single data segment.


Additional reference words: kbinf 7.00 1.00 1.50 _vmalloc _vfree
KBCategory: kbprg
KBSubcategory: CRTIss
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.