class FakeAllocator

Defined at line 69 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

This fake will fulfill any allocation so long as it isn't configured to fail by calling

|FailNextAllocation|.

Public Methods

void FakeAllocator (pci_address_space_t type)

Defined at line 71 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

void FailNextAllocation (bool assigned_only)

Arms the allocator to fail the next allocation. If |assigned_only| is true

(default), only fails allocations that request a specific base address.

Defined at line 74 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

void SetResource (zx::resource resource)

Sets an optional backing resource duplicated into allocations created by this allocator.

Defined at line 82 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

zx::result<std::unique_ptr<PciAllocation>> Allocate (std::optional<zx_paddr_t> in_base, size_t size)

Defined at line 84 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

zx_status_t SetParentAllocation (std::unique_ptr<PciAllocation> alloc)

Defined at line 106 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

const std::vector<AllocationLogEntry> & allocation_log ()

Defined at line 111 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h