]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mempool: drop unused factory type
authorSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 15:15:35 +0000 (10:15 -0500)
committerSage Weil <sage@redhat.com>
Fri, 11 Nov 2016 19:59:53 +0000 (14:59 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/include/mempool.h

index 9e18a0f603d189193f40777e0fa586a3ca0f7074..6a2e2ebcc2caf3b7343e4deed8cbc9e3b97dc6b4 100644 (file)
@@ -323,24 +323,6 @@ public:
 };
 
 
-// There is one factory associated with every type that lives in a
-// mempool.
-
-template<pool_index_t pool_ix,typename o>
-class factory {
-public:
-  typedef pool_allocator<pool_ix,o> 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<k>>                            \
     using unordered_map =                                              \
       std::unordered_map<k,v,h,eq,pool_allocator<std::pair<k,v>>>;     \
-    template<typename v>                                               \
-    using factory = mempool::factory<id,v>;                            \
     inline size_t allocated_bytes() {                                  \
       return mempool::get_pool(id).allocated_bytes();                  \
     }                                                                  \