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
void markAllocated(Slot& slot) {
slot.localNext.store(uint32_t(-1), std::memory_order_release);
}
void markAllocated(Slot& slot) {
slot.localNext.store(uint32_t(-1), std::memory_order_release);
}
+
+ public:
+ static constexpr std::size_t kSlotSize = sizeof(Slot);