1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-25 05:40:39 -05:00

replace new/delete with sp

This commit is contained in:
4ertus2
2024-10-20 08:24:09 +03:00
parent e32731b60b
commit ab5be0b773
71 changed files with 271 additions and 387 deletions

View File

@@ -312,7 +312,7 @@ void benchmark()
constexpr uint32_t N = 1U << 21;
VirtualMemory::init(0, N);
VirtualMemory* memory = new VirtualMemory(N * 8, true, false, false);
std::shared_ptr<VirtualMemory> memory = std::make_shared<VirtualMemory>(N * 8, true, false, false);
// 2 MB cache per core by default
size_t max_scratchpad_size = 1U << 21;
@@ -438,7 +438,6 @@ void benchmark()
delete helper;
CnCtx::release(ctx, 8);
delete memory;
});
t.join();