class GuardedPageBlock

Defined at line 116 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

This describes a page-aligned block mapped inside a VMAR with guard regions.

This is used for thread stacks, and for the thread area.

Public Methods

void GuardedPageBlock ()

Defined at line 118 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

void GuardedPageBlock (const GuardedPageBlock & )

Defined at line 119 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

void GuardedPageBlock (GuardedPageBlock && other)

Defined at line 121 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

GuardedPageBlock & operator= (GuardedPageBlock && other)

Defined at line 126 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

void reset ()

Defined at line 142 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

uintptr_t release ()

Defined at line 148 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

void ~GuardedPageBlock ()

Defined at line 154 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

size_t size_bytes ()

Defined at line 156 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

const zx::vmar & vmar ()

Defined at line 158 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

template <typename T = std::byte>
zx::result<std::span<T>> Allocate (zx::unowned_vmar allocate_from, AllocationVmo & vmo, PageRoundedSize data_size, PageRoundedSize guard_below, PageRoundedSize guard_above)

Allocate a guarded block by consuming the next pages of the VMO.

The returned span does not include the guard regions.

The generic template is implemented inline below.

Defined at line 177 of file ../../sdk/lib/c/pthread/../threads/../startup/../zircon/vmar.h

template <>
zx::result<std::span<std::byte>> Allocate<std::byte> (zx::unowned_vmar allocate_from, AllocationVmo & vmo, PageRoundedSize data_size, PageRoundedSize guard_below, PageRoundedSize guard_above)

The underlying implementation is out-of-line in this specialization.

Defined at line 26 of file ../../sdk/lib/c/zircon/vmar.cc