Class BoundaryTagAllocator
Defined in File Allocators.h
Class Documentation
-
class BoundaryTagAllocator
the dynamic storage allocation with boundary tags
Public Types
Public Functions
-
explicit BoundaryTagAllocator(long N, Fit fit = Fit::FIRST)
a memory of N words, all free
- Pre:
N >= 4
-
long allocate(long n)
a block of at least n words, or -1
- Pre:
n >= 1
-
void free(long a)
frees the block at a
- Pre:
a was given by allocate() and is in use
-
long freeWords(void) const
the words in free blocks
-
long freeBlocks(void) const
the number of free blocks
-
explicit BoundaryTagAllocator(long N, Fit fit = Fit::FIRST)