1: #include "../h/rt.h"
   2: #include "../h/gc.h"
   3: int stkbase;
   4: int stktop;
   5: 
   6: /*
   7:  * ddump - dump a descriptor.  Used only for debugging.
   8:  */
   9: 
  10: ddump(desc)
  11: struct descrip *desc;
  12:    {
  13:    printf("%08x: ",desc);
  14:    if (isptr(desc))
  15:       if (VAR(*desc))
  16:          printf("%15s","interior ptr.");
  17:       else
  18:          printf("%15s",blkname[(desc->type)&TYPEMASK]);
  19:    else
  20:       if (QUAL(*desc))
  21:          printf("%15s","str. qualifier");
  22:       else
  23:          printf("%15s","integer");
  24:    printf(" %08x %08x\n",desc->type,desc->value.integr);
  25:    }
  26: 
  27: 
  28: /*
  29:  * mdump - dump the heap.  Used only for debugging.
  30:  */
  31: 
  32: mdump()
  33:    {
  34:    register char *blk;
  35:    register int type, size, fdesc;
  36:    register struct descrip *ndesc;
  37: 
  38:    printf("\nDump of heap.  base:%08x free:%08x max:%08x\n",
  39:            hpbase,hpfree,maxheap);
  40:    printf("  loc     type              size  contents\n");
  41: 
  42:    for (blk = hpbase; blk < hpfree; blk += getsize(blk)) {
  43:       type = blktype(blk);
  44:       size = getsize(blk);
  45:       printf(" %08x   %15s   %4d\n",blk,blkname[type],size);
  46:       if ((fdesc = firstd[type]) > 0)
  47:          for (ndesc = (struct descrip *) (blk + fdesc);
  48:                ndesc < (struct descrip *) (blk + size);ndesc++)  {
  49:             printf("                                 ");
  50:             ddump(ndesc);
  51:             }
  52:       printf("\n");
  53:       }
  54:    printf("end of heap.\n");
  55:    }

Defined functions

ddump defined in line 10; used 1 times
  • in line 50
mdump defined in line 32; never used

Defined variables

stkbase defined in line 3; never used
stktop defined in line 4; never used
Last modified: 1984-11-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 891
Valid CSS Valid XHTML 1.0 Strict