Consolidate testing memory setup
This commit is contained in:
@@ -65,7 +65,6 @@ frame_allocator::init(
|
||||
{
|
||||
m_free.append(free);
|
||||
m_used.append(used);
|
||||
consolidate_blocks();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -22,6 +22,9 @@ public:
|
||||
using region_node = list_node<region_type>;
|
||||
using region_list = linked_list<region_type>;
|
||||
|
||||
static const size_t min_alloc = (1 << size_min);
|
||||
static const size_t max_alloc = (1 << size_max);
|
||||
|
||||
/// Constructor.
|
||||
buddy_allocator() {}
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
/// \arg count The number of frames to be freed
|
||||
void free(uintptr_t address, size_t count);
|
||||
|
||||
private:
|
||||
/// Consolidate the free and used block lists. Return freed blocks
|
||||
/// to the cache.
|
||||
void consolidate_blocks();
|
||||
|
||||
private:
|
||||
frame_block_list m_free; ///< Free frames list
|
||||
frame_block_list m_used; ///< In-use frames list
|
||||
frame_block_slab m_block_slab; ///< frame_block slab allocator
|
||||
|
||||
Reference in New Issue
Block a user