PMM - alloc return 0 if no free pages

This commit is contained in:
Thomas Lovén 2017-12-21 15:11:01 +01:00
parent 776fd87862
commit 9b930ae5d3

View File

@ -13,3 +13,8 @@ TEST(alloc_returns_freed_page)
void *a = pmm_alloc(); void *a = pmm_alloc();
ASSERT_EQ_PTR(a, &mem[0]); ASSERT_EQ_PTR(a, &mem[0]);
} }
TEST(alloc_returns_0_if_no_free_pages)
{
void *a = pmm_alloc();
ASSERT_EQ_PTR(a, 0);
}