From bda034bb825f48e2c1a353a0c7ee2949c47ea793 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 24 Jan 2025 03:22:58 +0000 Subject: [PATCH] rocr: Fix HostQueue to obey the alignment requirement Change-Id: I06542e9ff94e826ca0abba0328b301fec50a95ea [ROCm/ROCR-Runtime commit: 7d64fe49fa546fd67c834e4a22efa98649491c29] --- projects/rocr-runtime/runtime/hsa-runtime/core/inc/host_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/host_queue.h b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/host_queue.h index 8d2fae1831..4219068afb 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/host_queue.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/host_queue.h @@ -165,7 +165,7 @@ class HostQueue : public Queue { } void* operator new(size_t size) { - return _aligned_malloc(size, HSA_QUEUE_ALIGN_BYTES); + return _aligned_malloc(AlignUp(size, HSA_QUEUE_ALIGN_BYTES), HSA_QUEUE_ALIGN_BYTES); } void* operator new(size_t size, void* ptr) { return ptr; }