revert async_pool_alloc

This commit is contained in:
mutouyun 2019-10-07 12:32:12 +00:00
parent 1fd8e27994
commit d3afbdedc6
3 changed files with 4 additions and 4 deletions

View File

@ -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>

View File

@ -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>;

View File

@ -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);
}