20 #ifndef _UTILITY_MEMORY_POOL 21 #define _UTILITY_MEMORY_POOL 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/processor/types.h" 26 #include "pedigree/kernel/process/ConditionVariable.h" 27 #include "pedigree/kernel/process/Mutex.h" 29 #include "pedigree/kernel/process/MemoryPressureManager.h" 30 #include "pedigree/kernel/processor/MemoryRegion.h" 31 #include "pedigree/kernel/utilities/ExtensibleBitmap.h" 32 #include "pedigree/kernel/utilities/String.h" 47 virtual const String getMemoryPressureDescription();
70 bool initialise(
size_t poolSize,
size_t bufferSize = 1024);
75 return m_bInitialised;
85 uintptr_t allocateNow();
88 void free(uintptr_t buffer);
105 #ifndef STANDALONE_MEMPOOL 116 #ifndef STANDALONE_MEMPOOL 122 uintptr_t allocateDoer(
bool canBlock);
ExtensibleBitmap m_AllocBitmap
Allocation bitmap.
bool initialised()
Call if you aren't certain that the object has been initialised yet.
bool m_bInitialised
Has this instance been initialised yet?
Special memory entity in the kernel's virtual address space.
size_t m_BufferCount
Number of buffers we have available.
size_t m_BufferSize
Size of each buffer in this pool.