home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mesa5.zip / mesa5src.zip / debug_mem.h < prev    next >
Text File  |  2000-04-21  |  1KB  |  16 lines

  1. /* Debug_mem.h */
  2.  
  3. #define CHECK_MEM  {int  rc = _heapchk();\
  4.     if (_HEAPOK != rc)               \
  5.      { switch(rc) {                  \
  6.           case _HEAPEMPTY:  printf("The heap has not been initialized in %i of %s",__LINE__,__FUNCTION__);\
  7.              break;                                                    \
  8.           case _HEAPBADNODE: printf("A memory node is corrupted or the heap is damaged in %i of %s",__LINE__, __FUNCTION__);\
  9.              break;                                                                     \
  10.           case _HEAPBADBEGIN: printf("The heap specified is not valid in %i of %s",__LINE__,__FUNCTION__);                 \
  11.              break;                                                                     \
  12.        }                                                                                \
  13.        exit(rc);                                                                        \  
  14.     }                                                                                   \
  15.                     }
  16.