From: Sage Weil Date: Wed, 9 Nov 2016 15:15:35 +0000 (-0500) Subject: mempool: drop unused factory type X-Git-Tag: v11.1.0~325^2~10 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bd601c648ddac8246b06acf426522059b55b1ab1;p=ceph-ci.git mempool: drop unused factory type Signed-off-by: Sage Weil --- diff --git a/src/include/mempool.h b/src/include/mempool.h index 9e18a0f603d..6a2e2ebcc2c 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -323,24 +323,6 @@ public: }; -// There is one factory associated with every type that lives in a -// mempool. - -template -class factory { -public: - typedef pool_allocator allocator_type; - static allocator_type alloc; - - static void *allocate() { - return (void *)alloc.allocate(1); - } - static void free(void *p) { - alloc.deallocate((o *)p, 1); - } -}; - - // Namespace mempool #define P(x) \ @@ -365,8 +347,6 @@ public: typename eq = std::equal_to> \ using unordered_map = \ std::unordered_map>>; \ - template \ - using factory = mempool::factory; \ inline size_t allocated_bytes() { \ return mempool::get_pool(id).allocated_bytes(); \ } \