class FakeAllocator

Defined at line 65 of file ../../src/devices/bus/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 67 of file ../../src/devices/bus/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 70 of file ../../src/devices/bus/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 77 of file ../../src/devices/bus/drivers/pci/test/fakes/fake_allocator.h

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

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

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

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