99 corrected += boundary - (addr % boundary);
Allocator * m_parent
Our parent Allocator, if any.
virtual Result release(const Address addr)
Release memory.
Range m_range
Range of memory that this Allocator manages.
Allocator * parent()
Get parent Allocator.
static void setDefault(Allocator *alloc)
Makes the given Allocator the default.
virtual Size available() const
Get memory available.
Address base() const
Get memory base address for allocations.
virtual Size size() const
Get memory size.
Size alignment() const
Get memory alignment in bytes for allocations.
Allocator()
Default class constructor.
virtual Result allocate(Range &range)
Allocate memory.
void setParent(Allocator *parent)
Set parent allocator.
static Allocator * m_default
Points to the default Allocator for new()/delete().
virtual ~Allocator()
Class destructor.
static Allocator * getDefault()
Retrieve the currently default Allocator.
Result
Allocation results.
Address aligned(const Address addr, const Size boundary) const
Align memory address.
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
#define assert(exp)
Insert program diagnostics.
unsigned int u32
Unsigned 32-bit number.
unsigned long Address
A memory address.
unsigned int Size
Any sane size indicator cannot go negative.
Describes a range of memory.
Size alignment
Alignment in bytes or ZERO for default alignment.
Address address
Starting address of the memory range.
Size size
Amount of memory in bytes.