@@ -449,7 +449,7 @@ int32_t GPUReconstruction::Exit()
449449 if (mMemoryResources [i].mReuse >= 0 ) {
450450 continue ;
451451 }
452- operator delete (mMemoryResources [i].mPtrDevice GPUCA_OPERATOR_NEW_ALIGNMENT );
452+ operator delete (mMemoryResources [i].mPtrDevice , std::align_val_t (GPUCA_BUFFER_ALIGNMENT) );
453453 mMemoryResources [i].mPtr = mMemoryResources [i].mPtrDevice = nullptr ;
454454 }
455455 }
@@ -577,7 +577,7 @@ void GPUReconstruction::AllocateRegisteredMemoryInternal(GPUMemoryResource* res,
577577 if (mProcessingSettings .memoryAllocationStrategy == GPUMemoryResource::ALLOCATION_INDIVIDUAL && (control == nullptr || control->useInternal ())) {
578578 if (!(res->mType & GPUMemoryResource::MEMORY_EXTERNAL)) {
579579 if (res->mPtrDevice && res->mReuse < 0 ) {
580- operator delete (res->mPtrDevice GPUCA_OPERATOR_NEW_ALIGNMENT );
580+ operator delete (res->mPtrDevice , std::align_val_t (GPUCA_BUFFER_ALIGNMENT) );
581581 }
582582 res->mSize = std::max ((size_t )res->SetPointers ((void *)1 ) - 1 , res->mOverrideSize );
583583 if (res->mReuse >= 0 ) {
@@ -587,7 +587,7 @@ void GPUReconstruction::AllocateRegisteredMemoryInternal(GPUMemoryResource* res,
587587 }
588588 res->mPtrDevice = mMemoryResources [res->mReuse ].mPtrDevice ;
589589 } else {
590- res->mPtrDevice = operator new (res->mSize + GPUCA_BUFFER_ALIGNMENT GPUCA_OPERATOR_NEW_ALIGNMENT );
590+ res->mPtrDevice = operator new (res->mSize + GPUCA_BUFFER_ALIGNMENT, std::align_val_t (GPUCA_BUFFER_ALIGNMENT) );
591591 }
592592 res->mPtr = GPUProcessor::alignPointer<GPUCA_BUFFER_ALIGNMENT>(res->mPtrDevice );
593593 res->SetPointers (res->mPtr );
@@ -775,7 +775,7 @@ void GPUReconstruction::FreeRegisteredMemory(GPUMemoryResource* res)
775775 std::cout << " Freeing " << res->mName << " : size " << res->mSize << " (reused " << res->mReuse << " )\n " ;
776776 }
777777 if (mProcessingSettings .memoryAllocationStrategy == GPUMemoryResource::ALLOCATION_INDIVIDUAL && res->mReuse < 0 ) {
778- operator delete (res->mPtrDevice GPUCA_OPERATOR_NEW_ALIGNMENT );
778+ operator delete (res->mPtrDevice , std::align_val_t (GPUCA_BUFFER_ALIGNMENT) );
779779 }
780780 res->mPtr = nullptr ;
781781 res->mPtrDevice = nullptr ;
@@ -825,7 +825,7 @@ void GPUReconstruction::PopNonPersistentMemory(RecoStep step, uint64_t tag)
825825 for (uint32_t i = std::get<2 >(mNonPersistentMemoryStack .back ()); i < mNonPersistentIndividualAllocations .size (); i++) {
826826 GPUMemoryResource* res = mNonPersistentIndividualAllocations [i];
827827 if (res->mReuse < 0 ) {
828- operator delete (res->mPtrDevice GPUCA_OPERATOR_NEW_ALIGNMENT );
828+ operator delete (res->mPtrDevice , std::align_val_t (GPUCA_BUFFER_ALIGNMENT) );
829829 }
830830 res->mPtr = nullptr ;
831831 res->mPtrDevice = nullptr ;
0 commit comments