8 TEST(KernelSlab, Simple) {
9 const size_t size = 1024 * 1024;
17 EXPECT_EQ(alloc1, (
uint64_t)memory + 1024) <<
"correct pointer returned";
20 EXPECT_EQ(idx2, 1) <<
"correct index returned";
void * malloc(size_t size)
uint16_t size
Size of the loaded file.
TEST(KernelServiceDiscovery, Basic)
ptr_t slab_alloc(SlabHeader *slab)
void init_slab(ptr_t mem_start, ptr_t mem_end, size_t allocation_size)
static SlabIndexType slab_index(const SlabHeader *slab, const ptr_t mem)
uint16_t SlabIndexType
Type for indexing objects in a Slab region.