Skip to content

Commit 003df86

Browse files
committed
GPU: Ensure correct alignment of large host scratch buffer
1 parent 524f6d3 commit 003df86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GPU/GPUTracking/Base/GPUReconstructionCPU.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int GPUReconstructionCPU::InitDevice()
160160
mHostMemorySize = mDeviceMemorySize;
161161
}
162162
if (mMaster == nullptr) {
163-
mHostMemoryBase = operator new(mHostMemorySize);
163+
mHostMemoryBase = operator new(mHostMemorySize GPUCA_OPERATOR_NEW_ALIGNMENT);
164164
}
165165
mHostMemoryPermanent = mHostMemoryBase;
166166
ClearAllocatedMemory();
@@ -177,7 +177,7 @@ int GPUReconstructionCPU::ExitDevice()
177177
{
178178
if (mProcessingSettings.memoryAllocationStrategy == GPUMemoryResource::ALLOCATION_GLOBAL) {
179179
if (mMaster == nullptr) {
180-
operator delete(mHostMemoryBase);
180+
operator delete(mHostMemoryBase GPUCA_OPERATOR_NEW_ALIGNMENT);
181181
}
182182
mHostMemoryPool = mHostMemoryBase = mHostMemoryPoolEnd = mHostMemoryPermanent = nullptr;
183183
mHostMemorySize = 0;

0 commit comments

Comments
 (0)