...
MATs start at $0100. There is one word for each page in slot, ie. 64 entries per bank, max. 4096 entries for 1MB card. Entries are sorted in natural order.bits 0-11
bit 0 MAT_SYSTEM : page is used by OZ (eg. screen file)
bits 1-11 OFFSET : offset of next MAT entry in
...
chainbit 12 MAT_LAST : this page is last in chain, bits 0-11 are MemHandle>>4
bit 13 MAT_FULL : page fully used, can't be split
bit 14 MAT_ALLOCFIXED : page is allocated as fixed memory
bit 15 MAT_SWAP : page is used by OZ for bad application memory
Some examples :
00xx-0Fxx tagged as 0001 - system variables and such
10xx-17xx tagged as 8000 - swap area for bad apps
1800-1fff tagged as 0001 - stack
Page allocation scheme for <256 byte allocations (MAT_FULL (bit 13) not set in MAT)
XX00: yy offset to the first free chunk, 00 if no free chunks in page
if y=255 then page is invalid -> fail
...