18#ifndef __LIBALLOC_BITALLOCATOR_H
19#define __LIBALLOC_BITALLOCATOR_H
Result
Allocation results.
Size chunkSize() const
Get chunk size.
Result allocateFrom(Range &args, const Size startBit)
Allocate memory from defined starting address.
virtual Result release(const Address chunk)
Release memory chunk.
Size m_lastBit
Last bit that was set.
BitArray m_array
Marks which chunks are (un)used.
bool isAllocated(const Address page) const
Check if a chunk is allocated.
const Size m_chunkSize
Size of each chunk.
virtual Size available() const
Get available memory.
Result allocateAt(const Address addr)
Allocate a specific address.
virtual Result allocate(Range &args)
Allocate memory.
Represents an array of bits.
unsigned long Address
A memory address.
unsigned int Size
Any sane size indicator cannot go negative.
unsigned char u8
Unsigned 8-bit number.
Describes a range of memory.