Consolidate testing memory setup

This commit is contained in:
Justin C. Miller
2019-03-07 23:53:38 -08:00
parent ac19d3f532
commit 241e1dacb0
6 changed files with 59 additions and 41 deletions

View File

@@ -65,7 +65,6 @@ frame_allocator::init(
{
m_free.append(free);
m_used.append(used);
consolidate_blocks();
}
void

View File

@@ -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() {}

View File

@@ -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