home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PMC101.ZIP / LIBSRC.ZIP / BMMALLOC.INC (.txt) < prev    next >
Text File  |  1994-06-24  |  2KB  |  63 lines

  1. DebugMode = 1
  2.  
  3.  
  4. extrn _database:dword
  5.  
  6.  
  7. Segment         _DATA dword public use32 'DATA'
  8. EndS            _DATA
  9. Segment         _BSS dword public use32 'BSS'
  10. EndS            _BSS
  11. Group           DGROUP  _DATA, _BSS
  12.  
  13.  
  14. NodeSigKey      equ 0da1eh
  15. If DebugMode
  16.   MBSig         equ 'LiVE'
  17.   MBSigInvl     equ 'DooG'
  18.   MBSigSize     = 4
  19. Else
  20.   MBSigSize     = 0
  21. EndIf
  22.  
  23.  
  24. ; -- EXTERNAL STRUCTURES --
  25. Struc MEMBLOCK
  26.   base          dd ?
  27.   size          dd ?
  28.   handle        dd ?
  29. EndS
  30.  
  31.  
  32. ; -- PUBLIC STRUCTURES --
  33. Struc WalkMBInf
  34.   adx           dd ?    ; IN:   if continue walk last MemArea adx
  35.                         ;       else ?
  36.                         ; OUT:  next MemArea adx
  37.                         ;       not modified if IN was last MemNode
  38.                         ;       if corrupt MEMBLOCK then ?
  39.   size          dd ?    ; OUT:  next MemArea size
  40.                         ;       if corrupt MEMBLOCK then ?
  41.   flags         db ?    ; 0: in flag    0 - continue walk
  42.                         ;               1 - start at begining of MEMBLOCK
  43.                         ;               NOTE: reset to 0 after command to start
  44.                         ; 1: out flag   0 - free mem area
  45.                         ;               1 - allocated mem area
  46.                         ; 2: out flag   0 - not last MemNode
  47.                         ;               1 - last MemNode
  48.                         ; 3: out flag   0 - valid MEMBLOCK
  49.                         ;               1 - corrupt MEMBLOCK (or bad adx)
  50.                         ; 4: out flag   0 - MEMBLOCK has a size
  51.                         ;               1 - MB size is zero (uninitalized)
  52. EndS
  53.  
  54.  
  55. ; -- PRIVATE STRUCTURES --
  56. Struc MemNode
  57.   If DebugMode
  58.     sig         dd ?            ; Size XOR NodeSigKey
  59.   EndIf
  60.   size          dd ?            ; bit 31:       0 - free mem area
  61.                                 ;               1 - allocated mem area
  62. EndS
  63.