home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / memdebug / memtypes.i < prev    next >
Encoding:
Text File  |  1994-03-08  |  2.3 KB  |  103 lines

  1. #include "memdebug.h"
  2.  
  3. #ifndef    __memdebug_Types__
  4. #define __memdebug_Types__
  5.  
  6. /**************************************************************************/
  7. /******************************* Data Types *******************************/
  8. /**************************************************************************/
  9.  
  10. struct t_OptionRecord
  11. {
  12.     t_biState        f_GeneralStatistics;
  13.     t_biState        f_AlphaList;
  14.     t_biState        f_NotFreeList;
  15.     t_biState        f_CallSequenceList;
  16.     
  17.     t_biState        f_SpuriousFreeList;
  18.     
  19.     t_biState        f_PrintContents;
  20.     t_biState        f_DestroyContents;
  21.     
  22.     long            f_GenerateErrorCount;
  23.     unsigned long    f_MaximalMemoryAvailable;
  24.     
  25.     char          * f_StatisticsFileName;
  26.     char          * f_ErrorFileName;
  27. };
  28.  
  29. typedef struct t_OptionRecord t_OptionRecord;
  30.  
  31. /**************************************************************************/
  32.  
  33. enum t_CallKind
  34. {
  35.     c_Malloc,
  36.     c_Calloc,
  37.     c_Realloc,
  38.     c_Free
  39. };
  40.  
  41. typedef enum t_CallKind t_CallKind;
  42.  
  43. /**************************************************************************/
  44.  
  45. struct t_CallSequenceLink
  46. {
  47.     struct t_CallSequenceLink      * f_Next;
  48.     struct t_CallSequenceLink      * f_Previous;
  49.     struct t_CallSequenceLink      * f_MallocLink;
  50.     struct t_BlockDescriptor      * f_BlockDescriptor;
  51.     t_CallKind                        f_CallKind;
  52.  
  53.     char                          *    f_SizeExpression;
  54.     unsigned long                    f_Size;
  55.     char                          * f_FileName;
  56.     long                            f_LineNumber;
  57. };
  58.  
  59. typedef struct t_CallSequenceLink    t_CallSequenceLink;
  60.  
  61. /**************************************************************************/
  62.  
  63. struct t_BlockDescriptor
  64. {
  65.     void                   *    f_Pointer;
  66.     char                  * f_Identifier;
  67.  
  68.     t_CallSequenceLink      * f_BackLink;
  69.     
  70.     long                    f_WatchdogValue;
  71.     
  72.     long                    f_TimesUsed;
  73.     unsigned long            f_TotalAllocated;
  74. };
  75.  
  76. typedef struct t_BlockDescriptor t_BlockDescriptor;
  77.  
  78. /**************************************************************************/
  79.  
  80. enum t_ObjectState
  81. {
  82.     c_Bad = 0,
  83.     c_Ok
  84. };
  85.  
  86. typedef enum t_ObjectState t_ObjectState;
  87.  
  88. /**************************************************************************/
  89. /*************************** Utility Prototype ****************************/
  90. /**************************************************************************/
  91.  
  92. int    compare_BlockPointers    (    t_BlockDescriptor      *    p_Block1,
  93.                                 t_BlockDescriptor      *    p_Block2);
  94.  
  95. int    compare_Identifiers        (    t_BlockDescriptor      *    p_Block1,
  96.                                 t_BlockDescriptor      *    p_Block2);
  97.  
  98. void treat_InternalError    (    int    p_ErrorCode    );
  99.  
  100.  
  101. #endif
  102.  
  103.