From 45bf1a7b38c7a53fc9905ae5e905f5dd9c9628c4 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sat, 5 Oct 2019 03:54:17 +0000 Subject: [PATCH] use 'replenish' for async_wrapper --- src/memory/alloc.h | 2 -- src/memory/wrapper.h | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/memory/alloc.h b/src/memory/alloc.h index 9388d1c..04256dc 100755 --- a/src/memory/alloc.h +++ b/src/memory/alloc.h @@ -12,8 +12,6 @@ #include "platform/detail.h" -#include "log.h" - namespace ipc { namespace mem { diff --git a/src/memory/wrapper.h b/src/memory/wrapper.h index 4ed6fbc..9b6a36f 100755 --- a/src/memory/wrapper.h +++ b/src/memory/wrapper.h @@ -224,10 +224,10 @@ private: w_->recycler_.collect(std::move(*this)); } - // auto alloc(std::size_t size) { - // w_->recycler_.try_replenish(*this, size); - // return AllocP::alloc(size); - // } + auto alloc(std::size_t size) { + w_->recycler_.try_replenish(*this, size); + return AllocP::alloc(size); + } }; friend class alloc_proxy;