home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / emerald / emrldsys.lha / Kernel / Em / mallocStats.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-17  |  718 b   |  29 lines

  1. /*  C O P Y R I G H T   N O T I C E :                                     */
  2. /* Copyright 1986 Eric Jul and Norm Hutchinson.     May not be used for any  */
  3. /* purpose without written permission from the authors.              */
  4.  
  5. /* Snapshot to print allocated data areas                                 */
  6.  
  7. #ifndef stdTypes
  8. #include "Kernel/h/stdTypes.h"
  9. #endif
  10. #include "Kernel/h/kmdTypes.h"
  11.  
  12. displayAllocatedHunk(pc, num, mp)
  13. unsigned int pc, num, mp;
  14. {
  15.   KMDPrint("Allocated from 0x%08.8x, size %5d, addr 0x%08.8x\n", pc, num, mp);
  16. }
  17.  
  18. MallocDump()
  19. {
  20.   KMDPrint("Display of storage allocated by malloc\n");
  21.   malloc_doall(displayAllocatedHunk);
  22. }
  23.  
  24. void MallocInit()
  25. {
  26.   DebugMsg(6, "MallocInit\n");
  27.   KMDSetSnap(MallocDump);
  28. }
  29.