home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / stubshack / HeapGraph / !HeapDisp / c / StatDispl < prev    next >
Encoding:
Text File  |  1994-10-21  |  568 b   |  24 lines

  1. #include "Shell.Label.h"
  2.  
  3. #include "Structs.h"
  4. #include "StatDispl.h"
  5.  
  6.  
  7.  
  8.  
  9. void    UpdateAppStatsDisplay( app_block *app)
  10. {
  11. Shell_ReLabelf( app->numblocks,        "Number of blocks:       %8i ", app->num_blocks);
  12. Shell_ReLabelf( app->total,        "Total memory allocated: %8i ", app->stats.total);
  13. Shell_ReLabelf( app->totalmem,        "Memory space:           %8i ", app->max_mem-app->min_mem);
  14.  
  15. if ( app->max_mem != app->min_mem)
  16.     Shell_ReLabelf(
  17.         app->percentageused,
  18.         "Percentage used:        %8.2f%%",
  19.         100.0*app->stats.total / ((double) app->max_mem-app->min_mem)
  20.         );
  21.  
  22. return;
  23. }
  24.