24.02.1
|
Go to the documentation of this file.
37 : _allocator(
allocator), _blob(), _blob_info(blob_info)
53 for (
auto &handle : handles)
56 handle.first->set_owned_region(_blob->extract_subregion(handle.second, _blob_info.
size - handle.second));
62 for (
auto &handle : handles)
65 handle.first->set_region(
nullptr);
77 return std::make_unique<OffsetMemoryPool>(_allocator, _blob_info);
void release(MemoryMappings &handles) override
Releases a memory block.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
@ OFFSETS
Mappings are in offset granularity in the same blob.
MappingType mapping_type() const override
Returns the mapping types that this pool accepts.
virtual std::unique_ptr< IMemoryRegion > make_region(size_t size, size_t alignment)=0
Create self-managed memory region.
std::unique_ptr< IMemoryPool > duplicate() override
Duplicates the existing memory pool.
Copyright (c) 2017-2024 Arm Limited.
void acquire(MemoryMappings &handles) override
Sets occupant to the memory pool.
OffsetMemoryPool(IAllocator *allocator, BlobInfo blob_info)
Default Constructor.
const BlobInfo & info() const
Accessor to the pool internal configuration meta-data.
std::map< IMemory *, size_t > MemoryMappings
A map of (handle, index/offset), where handle is the memory handle of the object to provide the memor...
size_t alignment
Blob alignment.
Meta-data information for each blob.
input allocator() -> allocate()