aboutsummaryrefslogtreecommitdiff
path: root/absl/container/internal/raw_hash_set_test.cc
diff options
context:
space:
mode:
authorEvan Brown <ezb@google.com>2023-08-04 10:34:09 -0700
committerCopybara-Service <copybara-worker@google.com>2023-08-04 10:35:17 -0700
commit8f241e778c08cfb4213877b5022442a8d1921b58 (patch)
treef61de6bad1cbf5f6feb9ab96ea156bb44f8ea683 /absl/container/internal/raw_hash_set_test.cc
parent039d70f69b34b59d9696c655689316a94026fd0e (diff)
downloadabseil-8f241e778c08cfb4213877b5022442a8d1921b58.tar.gz
abseil-8f241e778c08cfb4213877b5022442a8d1921b58.tar.bz2
abseil-8f241e778c08cfb4213877b5022442a8d1921b58.zip
Store infoz on the heap instead of inline and store it only when we are sampling the current allocation.
PiperOrigin-RevId: 553847957 Change-Id: Idd131d0362bf36bd22d9bd20df54bd9ae50f0e28
Diffstat (limited to 'absl/container/internal/raw_hash_set_test.cc')
-rw-r--r--absl/container/internal/raw_hash_set_test.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/absl/container/internal/raw_hash_set_test.cc b/absl/container/internal/raw_hash_set_test.cc
index 242a97cb..55c6f62e 100644
--- a/absl/container/internal/raw_hash_set_test.cc
+++ b/absl/container/internal/raw_hash_set_test.cc
@@ -524,13 +524,6 @@ TEST(Table, EmptyFunctorOptimization) {
static_assert(std::is_empty<std::allocator<int>>::value, "");
struct MockTable {
- void* infoz;
- void* ctrl;
- void* slots;
- size_t size;
- size_t capacity;
- };
- struct MockTableInfozDisabled {
void* ctrl;
void* slots;
size_t size;
@@ -555,9 +548,7 @@ TEST(Table, EmptyFunctorOptimization) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
#endif
- constexpr size_t mock_size = std::is_empty<HashtablezInfoHandle>()
- ? sizeof(MockTableInfozDisabled)
- : sizeof(MockTable);
+ constexpr size_t mock_size = sizeof(MockTable);
constexpr size_t generation_size =
SwisstableGenerationsEnabled() ? sizeof(GenerationData) : 0;
#if defined(__clang__)