Go to the documentation of this file.
18 #ifndef __LIBALLOC_SPLITALLOCATOR_H
19 #define __LIBALLOC_SPLITALLOCATOR_H
49 const Range virtRange,
virtual Result allocate(Range &args)
Allocate physical memory.
BitAllocator m_alloc
Physical memory allocator.
const Size m_pageSize
Size of a memory page.
Represents a callback function.
virtual Size available() const
Get memory available.
unsigned long Address
A memory address.
Allocator which separates kernel mapped memory at virtual and physical addresses.
unsigned int Size
Any sane size indicator cannot go negative.
Describes a range of memory.
const Range m_virtRange
Virtual memory range to manage.
virtual Result release(const Address addr)
Release memory page.
Address toPhysical(const Address virt) const
Convert Address to physical pointer.
SplitAllocator(const Range physRange, const Range virtRange, const Size pageSize)
Class constructor.
bool isAllocated(const Address page) const
Check if a physical page is allocated.
Address toVirtual(const Address phys) const
Convert Address to virtual pointer.
Result
Allocation results.
Result allocateSparse(const Range &range, CallbackFunction *function)
Allocate sparse (non-contiguous) physical memory.