diff --git a/util/arena_test.cc b/util/arena_test.cc index a5336eb8b..148d54468 100644 --- a/util/arena_test.cc +++ b/util/arena_test.cc @@ -36,7 +36,7 @@ void MemoryAllocatedBytesTest(size_t huge_page_size) { arena.Allocate(req_sz); } expected_memory_allocated = req_sz * N + Arena::kInlineSize; - ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated); + ASSERT_GE(arena.MemoryAllocatedBytes(), expected_memory_allocated); arena.Allocate(Arena::kInlineSize - 1); @@ -49,13 +49,13 @@ void MemoryAllocatedBytesTest(size_t huge_page_size) { arena.Allocate(req_sz); } if (huge_page_size) { - ASSERT_TRUE(arena.MemoryAllocatedBytes() == + ASSERT_TRUE(arena.MemoryAllocatedBytes() >= expected_memory_allocated + bsz || - arena.MemoryAllocatedBytes() == + arena.MemoryAllocatedBytes() >= expected_memory_allocated + huge_page_size); } else { expected_memory_allocated += bsz; - ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated); + ASSERT_GE(arena.MemoryAllocatedBytes(), expected_memory_allocated); } // requested size > size of a block: @@ -66,7 +66,7 @@ void MemoryAllocatedBytesTest(size_t huge_page_size) { arena.Allocate(req_sz); } expected_memory_allocated += req_sz * N; - ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated); + ASSERT_GE(arena.MemoryAllocatedBytes(), expected_memory_allocated); } // Make sure we didn't count the allocate but not used memory space in