IndexedMemPool: Initialize and destroy Atom in slots_
Summary: This is only a bug when Atom != std::atomic (for example when Atom = DeterministicAtomic) since the mmap region is zero-intialized, and the std::atomic constructor does no initialization other than zero initialization. However, this assumption does not hold when Atom != std::atomic. I'm not super familiar with the details of IndexedMemPool, so perhaps there is a more clever way to initialize and destroy the Atom instances in slots_, but I decided to go with this simple solution since it only modifies the construtor and destructor. Reviewed By: yfeldblum Differential Revision: D10277293 fbshipit-source-id: 1e70a07963117b04e76f341c5b5148602d4ca48d
Showing
Please register or sign in to comment