mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
void automatic memory recovery
This commit is contained in:
parent
f3eb6ba55a
commit
1fd8e27994
@ -69,8 +69,8 @@ public:
|
||||
master_allocs_.emplace(std::move(alc));
|
||||
}
|
||||
else const_cast<alloc_policy&>(*it).swap(alc);
|
||||
if (master_allocs_.size() <= 32) return;
|
||||
take_first_do([](alloc_policy &) {}); // erase first
|
||||
// if (master_allocs_.size() <= 32) return;
|
||||
// take_first_do([](alloc_policy &) {}); // erase first
|
||||
}
|
||||
|
||||
constexpr static auto try_replenish(alloc_policy&, std::size_t) noexcept {}
|
||||
|
||||
@ -33,13 +33,13 @@ private slots:
|
||||
|
||||
#include "test_mem.moc"
|
||||
|
||||
// constexpr int DataMin = 4;
|
||||
// constexpr int DataMax = 256;
|
||||
// constexpr int LoopCount = 4194304;
|
||||
constexpr int DataMin = 4;
|
||||
constexpr int DataMax = 256;
|
||||
constexpr int LoopCount = 4194304;
|
||||
|
||||
constexpr int DataMin = 256;
|
||||
constexpr int DataMax = 512;
|
||||
constexpr int LoopCount = 2097152;
|
||||
// constexpr int DataMin = 256;
|
||||
// constexpr int DataMax = 512;
|
||||
// constexpr int LoopCount = 2097152;
|
||||
|
||||
std::vector<std::size_t> sizes__;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user