Skip to content

Commit

Permalink
common: add warning on base class use of mempool
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed Sep 7, 2017
1 parent 59b5931 commit c0d0fa8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/include/mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ BlueStore::Onode, we need to do
(This is just because we need to name some static variables and we
can't use :: in a variable name.)
XXX Note: the new operator hard-codes the allocation size to the size of the
object given in MEMPOOL_DEFINE_OBJECT_FACTORY. For this reason, you cannot
incorporate mempools into a base class without also defining a helper/factory
for the child class as well (as the base class is usually smaller than the
child class).
In order to use the STL containers, simply use the namespaced variant
of the container type. For example,
Expand Down

0 comments on commit c0d0fa8

Please sign in to comment.