-
Notifications
You must be signed in to change notification settings - Fork 1
heap
(location, length, blocksize) heap.init reserves a 4 word header followed by a bit map of all blocks. The size of the bit map is (maxlength/blocksize)/16. length is actually the length of the heap, excluding the header and bit map.
The header consists of a magic word, 0x9ea9, the location of the first block in memory, the size of each block, and the maximum length of the heap.
This subroutine clears all of the space given to it.
returns location of header
Reserves the first consecutive length of memory in the heap.
returns the location of the reserved memory, or 1 if no such block of memory is available
UNDER DEVELOPMENT; DO NOT USE
Marks the blocks specified by location and length as free, and clears them.
returns location
Marks number of blocks used or unused, starting from the index block. 1
in used/unused denotes used
, and 0
denotes unused
.
return block