Fixed a compile warning in util/arena.cc when hugetlb is not supported.

Summary:
Fixed the following compile warning when hugetlb is not supported.

    ./util/arena.h:102:10: error: private field 'hugetlb_size_' is not used [-Werror,-Wunused-private-field]
      size_t hugetlb_size_ = 0;
             ^
    1 error generated.

Test Plan: make db_stress

Reviewers: igor, sdong, anthony, IslamAbdelRahman

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D47691
main
Yueh-Hsuan Chiang 9 years ago
parent 94ac8826c4
commit 0fdb4f1688
  1. 2
      util/arena.h

@ -99,7 +99,9 @@ class Arena : public Allocator {
// How many bytes left in currently active block? // How many bytes left in currently active block?
size_t alloc_bytes_remaining_ = 0; size_t alloc_bytes_remaining_ = 0;
#ifdef MAP_HUGETLB
size_t hugetlb_size_ = 0; size_t hugetlb_size_ = 0;
#endif // MAP_HUGETLB
char* AllocateFromHugePage(size_t bytes); char* AllocateFromHugePage(size_t bytes);
char* AllocateFallback(size_t bytes, bool aligned); char* AllocateFallback(size_t bytes, bool aligned);
char* AllocateNewBlock(size_t block_bytes); char* AllocateNewBlock(size_t block_bytes);

Loading…
Cancel
Save