mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Enable custom allocation alignments on Linux
Related-To: NEO-5750 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
21690dcea5
commit
33e8f73775
@@ -69,6 +69,10 @@ class GfxPartition {
|
||||
return getHeap(heapIndex).allocate(size);
|
||||
}
|
||||
|
||||
uint64_t heapAllocateWithCustomAlignment(HeapIndex heapIndex, size_t &size, size_t alignment) {
|
||||
return getHeap(heapIndex).allocateWithCustomAlignment(size, alignment);
|
||||
}
|
||||
|
||||
MOCKABLE_VIRTUAL void heapFree(HeapIndex heapIndex, uint64_t ptr, size_t size) {
|
||||
getHeap(heapIndex).free(ptr, size);
|
||||
}
|
||||
@@ -129,6 +133,7 @@ class GfxPartition {
|
||||
uint64_t getSize() const { return size; }
|
||||
uint64_t getLimit() const { return size ? base + size - 1 : 0; }
|
||||
uint64_t allocate(size_t &size) { return alloc->allocate(size); }
|
||||
uint64_t allocateWithCustomAlignment(size_t &sizeToAllocate, size_t alignment) { return alloc->allocateWithCustomAlignment(sizeToAllocate, alignment); }
|
||||
void free(uint64_t ptr, size_t size) { alloc->free(ptr, size); }
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user