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