fix: support alignments in host and shared UnifiedMemoryAllocation

Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
This commit is contained in:
Lu, Wenbin
2023-06-16 17:55:01 +00:00
committed by Compute-Runtime-Automation
parent b9837ef068
commit 4de792cee0
7 changed files with 157 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ bool operator<(const HeapChunk &hc1, const HeapChunk &hc2) {
}
uint64_t HeapAllocator::allocateWithCustomAlignment(size_t &sizeToAllocate, size_t alignment) {
if (alignment == 0) {
if (alignment < this->allocationAlignment) {
alignment = this->allocationAlignment;
}