Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fheapchk(DOS) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought

     Name
          _fheapchk, _nheapchk - Performs a minimal consistency check
          on the heap.

     Syntax
          #include <malloc.h>

          int _fheapchk(void)

          int _nheapchk(void)


     Description
          The _fheapchk and _nheapchk routines helps debug heap-
          related problems in programs.

          These routines check for minimal consistency on the
          unallocated memory space, or heap.  The consistency check
          determines whether all the heap entries are within the
          bounds of the heap's current memory allocation.

          In large data models (that is, compact- and large-model
          programs), use _fheapchk.  In small data models (small- and
          medium-model programs), use _nheapchk.

          These routines run a consistency check on the heap specified
          in the following table:
          Function    Heap Checked

          _fheapchk   Far heap (outside default data segment)

          _nheapchk   Near heap (inside default data segment)

     Return Value
          Both routines return an integer value that is one of the
          following manifest constants (defined in malloc.h):
          Constant        Meaning

          _HEAPOK         The heap appears to be consistent.

          _HEAPEMPTY      The heap has not been initialized.

          _HEAPBADBEGIN   The initial header information cannot be found, or
                          it is bad.

          _HEAPBADNODE    A bad node has been found, or the heap is damaged.

     See Also
          _fheapwalk(DOS)

                                                     (printed 6/18/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026