Skip to content
PageAllocatorInitAligned

PageAllocatorInitAligned

Description

Initialize a PageAllocator with a custom alignment floor. Page-backed memory is naturally page-aligned, so requests below the page size are rounded up. Stronger-than-page alignment is best-effort.

Usage example (Cross-references)

Usage examples (Cross-references)
        // assert page-alignment here since that is what mmap guarantees
        // portably.
        PageAllocator alloc      = PageAllocatorInitAligned(64);
        Allocator    *alloc_base = ALLOCATOR_OF(&alloc);
        size          page       = PageAllocatorPageSize(&alloc);
Last updated on