Skip to content

Commit

Permalink
Fixed a compile warning in util/arena.cc when hugetlb is not supported.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yhchiang committed Sep 28, 2015
1 parent 94ac882 commit 0fdb4f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ class Arena : public Allocator {
// How many bytes left in currently active block?
size_t alloc_bytes_remaining_ = 0;

#ifdef MAP_HUGETLB
size_t hugetlb_size_ = 0;
#endif // MAP_HUGETLB
char* AllocateFromHugePage(size_t bytes);
char* AllocateFallback(size_t bytes, bool aligned);
char* AllocateNewBlock(size_t block_bytes);
Expand Down

0 comments on commit 0fdb4f1

Please sign in to comment.