mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
revert async_pool_alloc
This commit is contained in:
parent
1fd8e27994
commit
d3afbdedc6
@ -52,9 +52,9 @@ public:
|
||||
allocator_wrapper() noexcept {}
|
||||
|
||||
// no copy
|
||||
allocator_wrapper(const allocator_wrapper<T, AllocP>& rhs) noexcept {}
|
||||
allocator_wrapper(const allocator_wrapper<T, AllocP>&) noexcept {}
|
||||
template <typename U>
|
||||
allocator_wrapper(const allocator_wrapper<U, AllocP>& rhs) noexcept {}
|
||||
allocator_wrapper(const allocator_wrapper<U, AllocP>&) noexcept {}
|
||||
|
||||
allocator_wrapper(allocator_wrapper<T, AllocP> && rhs) noexcept : alloc_(std::move(rhs.alloc_)) {}
|
||||
template <typename U>
|
||||
|
||||
@ -19,7 +19,7 @@ namespace mem {
|
||||
|
||||
using async_pool_alloc =
|
||||
static_wrapper<variable_wrapper<async_wrapper<detail::fixed_alloc<
|
||||
scope_alloc<>, fixed_expand_policy<> >>>>;
|
||||
static_alloc, fixed_expand_policy<> >>>>;
|
||||
|
||||
template <typename T>
|
||||
using allocator = allocator_wrapper<T, async_pool_alloc>;
|
||||
|
||||
@ -127,7 +127,7 @@ void benchmark_alloc() {
|
||||
w = std::thread {[&, pid] {
|
||||
sw.start();
|
||||
for (std::size_t k = 0; k < 100; ++k)
|
||||
for (std::size_t n = (CacheSize * pid); n < (CacheSize * (pid + 1)); ++n) {
|
||||
for (int n = (CacheSize * pid); n < (CacheSize * (pid + 1)); ++n) {
|
||||
std::size_t s = sizes__[n];
|
||||
AllocT::free(AllocT::alloc(s), s);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user