Commit 37c61971 authored by Greg Nisbet's avatar Greg Nisbet Committed by Facebook Github Bot

add public kSlotSize to IndexedMemPool

Summary:
add public kSlotSize to IndexedMemPool,
needed to support getting the approximate memory footprint of the pool
(since a Slot has two atomic uint32_t's more than a bare Elem)

Reviewed By: yfeldblum

Differential Revision: D5690225

fbshipit-source-id: 667da6b67b339038b92b0e5acde17219fe1c85c5
parent 51647aaa
......@@ -506,6 +506,9 @@ struct IndexedMemPool : boost::noncopyable {
void markAllocated(Slot& slot) {
slot.localNext.store(uint32_t(-1), std::memory_order_release);
}
public:
static constexpr std::size_t kSlotSize = sizeof(Slot);
};
namespace detail {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment