(wangle) fix after-delete assert
[folly.git] / folly / Arena.h
index 2b93aa344547fd658cb0a3477a3c3d7c826498ef..ce758e5b4014fc7a81e7b3a7dec33ba924fd5e10 100644 (file)
@@ -149,7 +149,7 @@ class Arena {
    private:
     Block() { }
     ~Block() { }
-  } __attribute__((aligned));
+  } __attribute__((__aligned__));
   // This should be alignas(std::max_align_t) but neither alignas nor
   // max_align_t are supported by gcc 4.6.2.
 
@@ -157,6 +157,7 @@ class Arena {
   static constexpr size_t kDefaultMinBlockSize = 4096 - sizeof(Block);
   static constexpr size_t kNoSizeLimit = 0;
   static constexpr size_t kDefaultMaxAlign = alignof(Block);
+  static constexpr size_t kBlockOverhead = sizeof(Block);
 
  private:
   bool isAligned(uintptr_t address) const {