home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff240.lzh / MemLib / mwreport.c < prev    next >
C/C++ Source or Header  |  1989-08-28  |  2KB  |  50 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
  2. * |_o_o|\\ Copyright (c) 1989 The Software Distillery.                    *
  3. * |. o.| ||          All Rights Reserved                                  *
  4. * | .  | ||          Written by Doug Walker                               *
  5. * | o  | ||          The Software Distillery                              *
  6. * |  . |//           235 Trillingham Lane                                 *
  7. * ======             Cary, NC 27513                                       *
  8. *                    BBS:(919)-471-6436                                   *
  9. \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  10.  
  11. #include "mempriv.h"
  12.  
  13. extern struct MWGlobal mwg;
  14.  
  15. void MWReport(title, level)
  16. char *title;
  17. int level;
  18. {
  19.    struct MWAlc *mwa;
  20.  
  21.    if(!(mwg.flags & MWF_ACTIVE)) return;
  22.  
  23.    if(!(mwg.flags & MWF_NOCHECK)) MWCheck();
  24.  
  25.    if(level == MWR_NONE) return;
  26.  
  27.    if(!mwg.dbfh) return;
  28.  
  29.    MSG(mwg.dbfh, "********** MEMORY USAGE SUMMARY ");
  30.    if(title) MSG(mwg.dbfh, title);
  31.  
  32.    MSG(mwg.dbfh, "\n\nCurrent chip usage = ");
  33.    MWPrint(NULL, 3, mwg.sum[MWT_CHIP], mwg.num[MWT_CHIP]);
  34.  
  35.    MSG(mwg.dbfh, "Current fast usage = ");
  36.    MWPrint(NULL, 3, mwg.sum[MWT_FAST], mwg.num[MWT_FAST]);
  37.  
  38.    MWPrint(NULL, 4, mwg.max[MWT_CHIP], mwg.max[MWT_FAST]);
  39.  
  40.    if(level == MWR_SUM) return;
  41.  
  42.    MSG(mwg.dbfh, "********** MEMORY USAGE DETAIL\n\n"); 
  43.  
  44.    /*           0x00000000 [00000] ... */
  45.    for(mwa=mwg.first; mwa; mwa=mwa->next)
  46.       MWPrint(mwa, 0, 0, 0);
  47.  
  48.    MSG(mwg.dbfh, "\n**********\n\n"); 
  49. }
  50.