class AnonymousPageRequest

Defined at line 20 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

Helper around tracking and performing waits for the PMM to be able to succeed waitable

allocations. This is intended to a have a similar Wait method as a regular PageRequest to provide

a consistent interface. Users are unlikely to want to use this directly, and instead probably

want a MultiPageRequest.

This class is not thread safe.

Public Methods

void AnonymousPageRequest ()

Defined at line 22 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

void ~AnonymousPageRequest ()

Defined at line 23 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

zx::result<> Allocate ()

On success, a page is allocated.

Defined at line 23 of file ../../zircon/kernel/vm/anonymous_page_request.cc

void MakeActive ()

Make the request active, causing any future Wait calls to block on the PMM.

Caller must make sure no page is allocated (`!has_page()`) before calling `MakeActive()`.

Defined at line 31 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

bool is_active ()

Returns whether the request is active or not.

Defined at line 37 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

void Cancel ()

Make the request inactive, if it was currently active. As this class is not thread safe, it

assumes there are no parallel calls to Wait that would need to be interrupted.

Defined at line 41 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

vm_page_t * take_page ()

Retrieves a possibly allocated `page_request`.

Defined at line 47 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h

bool has_page ()

Defined at line 49 of file ../../zircon/kernel/vm/include/vm/anonymous_page_request.h