class FakeAllocator

Defined at line 70 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 (fuchsia_hardware_pci_root::AddressSpace type)

Defined at line 72 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 75 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 83 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 85 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_allocator.h

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

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

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

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