Skip to content

Commit

Permalink
Make ReservePoolPolicies owning (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
chillenzer authored Aug 23, 2024
1 parent 1aaf9de commit b8a7c58
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/include/mallocMC/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ namespace mallocMC
ALPAKA_FN_HOST void free()
{
devAllocatorBuffer = {};
reservePolicy.resetMemPool(heapInfos.p);
reservePolicy.resetMemPool();
heapInfos.size = 0;
heapInfos.p = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/include/mallocMC/reservePoolPolicies/AlpakaBuf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace mallocMC
return alpaka::getPtrNative(*poolBuffer);
}

void resetMemPool(void* p)
void resetMemPool()
{
poolBuffer = {};
}
Expand Down
2 changes: 1 addition & 1 deletion src/include/mallocMC/reservePoolPolicies/CudaSetLimits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace mallocMC
return nullptr;
}

static void resetMemPool(void* p = nullptr)
static void resetMemPool()
{
cudaDeviceSetLimit(cudaLimitMallocHeapSize, 8192U);
cudaGetLastError(); // cudaDeviceSetLimit() usually fails if any
Expand Down

0 comments on commit b8a7c58

Please sign in to comment.