diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-02-15 12:48:04 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-02-15 12:48:04 +0000 |
commit | 63c38b7244a7d954c898aeb545214592eccabbc2 (patch) | |
tree | d2864ab92aaae9f0a4cf9cd2b4727bb3d6f70d38 /databases/rocksdb | |
parent | 1d451321eb8e960b64fcc673f64a95c704273655 (diff) | |
download | ports-63c38b7244a7d954c898aeb545214592eccabbc2.tar.gz ports-63c38b7244a7d954c898aeb545214592eccabbc2.zip |
Notes
Diffstat (limited to 'databases/rocksdb')
-rw-r--r-- | databases/rocksdb/files/patch-util-arena.cc | 11 | ||||
-rw-r--r-- | databases/rocksdb/files/patch-util-arena.h | 11 | ||||
-rw-r--r-- | databases/rocksdb/files/patch-util-arena_test.cc | 11 |
3 files changed, 33 insertions, 0 deletions
diff --git a/databases/rocksdb/files/patch-util-arena.cc b/databases/rocksdb/files/patch-util-arena.cc new file mode 100644 index 000000000000..2b170f85986e --- /dev/null +++ b/databases/rocksdb/files/patch-util-arena.cc @@ -0,0 +1,11 @@ +--- util/arena.cc.orig 2018-01-31 01:15:39 UTC ++++ util/arena.cc +@@ -33,7 +33,7 @@ const size_t Arena::kInlineSize; + + const size_t Arena::kMinBlockSize = 4096; + const size_t Arena::kMaxBlockSize = 2u << 30; +-static const int kAlignUnit = alignof(max_align_t); ++static const int kAlignUnit = alignof(std::max_align_t); + + size_t OptimizeBlockSize(size_t block_size) { + // Make sure block_size is in optimal range diff --git a/databases/rocksdb/files/patch-util-arena.h b/databases/rocksdb/files/patch-util-arena.h new file mode 100644 index 000000000000..1fd0af44c083 --- /dev/null +++ b/databases/rocksdb/files/patch-util-arena.h @@ -0,0 +1,11 @@ +--- util/arena.h.orig 2018-01-31 01:15:39 UTC ++++ util/arena.h +@@ -82,7 +82,7 @@ class Arena : public Allocator { + } + + private: +- char inline_block_[kInlineSize] __attribute__((__aligned__(alignof(max_align_t)))); ++ char inline_block_[kInlineSize] __attribute__((__aligned__(alignof(std::max_align_t)))); + // Number of bytes allocated in one block + const size_t kBlockSize; + // Array of new[] allocated memory blocks diff --git a/databases/rocksdb/files/patch-util-arena_test.cc b/databases/rocksdb/files/patch-util-arena_test.cc new file mode 100644 index 000000000000..5c32f8cf682b --- /dev/null +++ b/databases/rocksdb/files/patch-util-arena_test.cc @@ -0,0 +1,11 @@ +--- util/arena_test.cc.orig 2018-01-31 01:15:39 UTC ++++ util/arena_test.cc +@@ -91,7 +91,7 @@ static void ApproximateMemoryUsageTest(s + ASSERT_EQ(kZero, arena.ApproximateMemoryUsage()); + + // allocate inline bytes +- const size_t kAlignUnit = alignof(max_align_t); ++ const size_t kAlignUnit = alignof(std::max_align_t); + EXPECT_TRUE(arena.IsInInlineBlock()); + arena.AllocateAligned(kAlignUnit); + EXPECT_TRUE(arena.IsInInlineBlock()); |