|
FreeNOS
|
Allocates same-sized objects from a contiguous block of memory. More...
Public Member Functions | |
| Pool (const Range &range, const Size objectSize, const Size bitmapSize, u8 *bitmap) | |
Public Member Functions inherited from BitAllocator | |
| BitAllocator (const Range range, const Size chunkSize, u8 *bitmap=ZERO) | |
| Constructor function. More... | |
| Size | chunkSize () const |
| Get chunk size. More... | |
| virtual Size | available () const |
| Get available memory. More... | |
| virtual Result | allocate (Range &args) |
| Allocate memory. More... | |
| Result | allocateFrom (Range &args, const Size startBit) |
| Allocate memory from defined starting address. More... | |
| Result | allocateAt (const Address addr) |
| Allocate a specific address. More... | |
| bool | isAllocated (const Address page) const |
| Check if a chunk is allocated. More... | |
| virtual Result | release (const Address chunk) |
| Release memory chunk. More... | |
Public Member Functions inherited from Allocator | |
| Allocator () | |
| Default class constructor. More... | |
| Allocator (const Range range) | |
| Class constructor with Range input. More... | |
| virtual | ~Allocator () |
| Class destructor. More... | |
| void | setParent (Allocator *parent) |
| Set parent allocator. More... | |
| Allocator * | parent () |
| Get parent Allocator. More... | |
| Address | base () const |
| Get memory base address for allocations. More... | |
| Size | alignment () const |
| Get memory alignment in bytes for allocations. More... | |
| virtual Size | size () const |
| Get memory size. More... | |
Data Fields | |
| Pool * | prev |
| Points to the previous pool of this size (if any). More... | |
| Pool * | next |
| Points to the next pool of this size (if any). More... | |
| Size | index |
| Index number in the m_pools array where this Pool is stored. More... | |
| const Size | bitmapSize |
| Size in bytes of the bitmap array. More... | |
Additional Inherited Members | |
Public Types inherited from Allocator | |
| enum | Result { Success = 0, InvalidAddress, InvalidSize, InvalidAlignment, OutOfMemory } |
| Allocation results. More... | |
| typedef struct Allocator::Range | Range |
| Describes a range of memory. More... | |
Static Public Member Functions inherited from Allocator | |
| static void | setDefault (Allocator *alloc) |
| Makes the given Allocator the default. More... | |
| static Allocator * | getDefault () |
| Retrieve the currently default Allocator. More... | |
Protected Member Functions inherited from Allocator | |
| Address | aligned (const Address addr, const Size boundary) const |
| Align memory address. More... | |
Allocates same-sized objects from a contiguous block of memory.
Definition at line 61 of file PoolAllocator.h.
|
inline |
Definition at line 63 of file PoolAllocator.h.
| const Size PoolAllocator::Pool::bitmapSize |
Size in bytes of the bitmap array.
Definition at line 78 of file PoolAllocator.h.
| Size PoolAllocator::Pool::index |
Index number in the m_pools array where this Pool is stored.
Definition at line 77 of file PoolAllocator.h.
Referenced by PoolAllocator::allocatePool(), and PoolAllocator::releasePool().
| Pool* PoolAllocator::Pool::next |
Points to the next pool of this size (if any).
Definition at line 76 of file PoolAllocator.h.
Referenced by PoolAllocator::allocatePool(), PoolAllocator::releasePool(), and PoolAllocator::retrievePool().
| Pool* PoolAllocator::Pool::prev |
Points to the previous pool of this size (if any).
Definition at line 75 of file PoolAllocator.h.
Referenced by PoolAllocator::allocatePool(), and PoolAllocator::releasePool().
1.8.17