class AddressSpaceAllocator

Defined at line 12 of file ../../src/graphics/magma/lib/magma_service/util/address_space_allocator.h

Public Methods

void AddressSpaceAllocator (uint64_t base, size_t size)

Constructs an address space ranging from address base to address base + size.

Defined at line 15 of file ../../src/graphics/magma/lib/magma_service/util/address_space_allocator.h

bool Alloc (size_t size, uint8_t align_pow2, uint64_t * addr_out)

Allocates an address for a region of the given size and alignment, where alignment

is specified by 2

<

<

align_pow2.

If alignment is less than a page than page alignment will be used.

On success returns true and addr_out is set; otherwise returns false.

bool Free (uint64_t addr)

Frees an address that was previously allocated.

bool GetSize (uint64_t addr, size_t * size_out)

Returns true and the size of the region if mapped; otherwise returns false.

void ~AddressSpaceAllocator ()

Defined at line 20 of file ../../src/graphics/magma/lib/magma_service/util/address_space_allocator.h

uint64_t base ()

Defined at line 22 of file ../../src/graphics/magma/lib/magma_service/util/address_space_allocator.h

size_t size ()

Defined at line 23 of file ../../src/graphics/magma/lib/magma_service/util/address_space_allocator.h