home *** CD-ROM | disk | FTP | other *** search
/ IRIS Development Option 6.2 / IRIS_Development_Option_6.2_814-0478-001.iso / dist / c_dev.idb / usr / share / src / customalloc / Database.h.z / Database.h
C/C++ Source or Header  |  1996-03-14  |  835b  |  46 lines

  1. /* -*-c-*- */
  2. #ifndef _Database_h_
  3. #define _Database_h_
  4.  
  5. #ifndef _UserMalloc_pre_h_
  6. #  include "UserMalloc-pre.h"
  7. #endif
  8.  
  9. /*
  10.  * Data structures for CustoMalloc caching
  11.  */
  12.  
  13. typedef struct CacheItemStruct CacheItem;
  14.  
  15. struct CacheItemStruct {
  16.   int size;
  17.   
  18.   int runs;
  19.  
  20.   double last_event;
  21.   double mallocs;
  22.   double frees;
  23.  
  24.   double objects_in_use;
  25.   double max_objects_in_use;
  26.   /*
  27.    * Sum of space used over all allocations/deallocations (across all runs)
  28.    */
  29.   double sum_objects_in_use;
  30.   double sum_objects_in_free_list;
  31.  
  32.   double objects_in_free_list;
  33.   double max_objects_in_free_list;
  34.  
  35.   /* Pointer to linked list of cached items */
  36.   MallocChunk *root;
  37.  
  38.   /* Pointer to linked list of cache records */
  39.   CacheItem *next;
  40. };
  41.  
  42. extern CacheItem *customalloc_read_database();
  43. extern void customalloc_write_database();
  44.  
  45. #endif
  46.