aboutsummaryrefslogtreecommitdiff
path: root/pw_allocator/freelist_heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pw_allocator/freelist_heap.cc')
-rw-r--r--pw_allocator/freelist_heap.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/pw_allocator/freelist_heap.cc b/pw_allocator/freelist_heap.cc
index a6124e39f..750a85773 100644
--- a/pw_allocator/freelist_heap.cc
+++ b/pw_allocator/freelist_heap.cc
@@ -24,7 +24,9 @@ namespace pw::allocator {
FreeListHeap::FreeListHeap(std::span<std::byte> region, FreeList& freelist)
: freelist_(freelist), heap_stats_() {
Block* block;
- Block::Init(region, &block);
+ PW_CHECK_OK(
+ Block::Init(region, &block),
+ "Failed to initialize FreeListHeap region; misaligned or too small");
freelist_.AddChunk(BlockToSpan(block));