template <size_t AllocSize>

class BaseIdSlabAllocator

Defined at line 226 of file ../../zircon/kernel/vm/include/vm/page_slab_allocator.h

Common base for a specialized PageSlabAllocator that can assign a numerical ID to each

allocation, in lieu of the pointer, and convert between. This base implements the conversion

functions under the assumption that the derived type is assigning each allocated slab a unique

ID, such that id*kAllocsPerSlab fits within a uint32_t.

The size of the ID is fixed at 32-bits, and not variable, since a 16-bit limit is unlikely to be

useful in practice, and a 64-bit limit has no value since the pointer is already a 64-bit ID.

Public Members

static const uint32_t kAllocsPerSlab

Public Methods

void BaseIdSlabAllocator<AllocSize> ()

Defined at line 229 of file ../../zircon/kernel/vm/include/vm/page_slab_allocator.h

void ~BaseIdSlabAllocator<AllocSize> ()

Defined at line 230 of file ../../zircon/kernel/vm/include/vm/page_slab_allocator.h

uint32_t AllocToId (const void * ptr)

Defined at line 232 of file ../../zircon/kernel/vm/include/vm/page_slab_allocator.h

void * IdToAlloc (uint32_t id)

Defined at line 237 of file ../../zircon/kernel/vm/include/vm/page_slab_allocator.h