diff options
author | Evan Brown <ezb@google.com> | 2023-09-05 11:04:27 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-09-05 11:05:15 -0700 |
commit | 415a1d1cb90bfd86ca08d5bcece210c4babe6e0e (patch) | |
tree | 298b645dfbac8aea080ad049382317ae85208e11 /absl/container | |
parent | 5c9f72faadaca7250b341b99da358e855a8d902e (diff) |
Remove the unused LowerBoundAllocatedByteSize function.
PiperOrigin-RevId: 562832827
Change-Id: If37f83e67b3b2ea350f74dd6bffae51ea5508f12
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/hashtable_debug.h | 8 | ||||
-rw-r--r-- | absl/container/internal/raw_hash_set.h | 12 |
2 files changed, 0 insertions, 20 deletions
diff --git a/absl/container/internal/hashtable_debug.h b/absl/container/internal/hashtable_debug.h index 19d52121..c79c1a98 100644 --- a/absl/container/internal/hashtable_debug.h +++ b/absl/container/internal/hashtable_debug.h @@ -95,14 +95,6 @@ size_t AllocatedByteSize(const C& c) { HashtableDebugAccess<C>::AllocatedByteSize(c); } -// Returns a tight lower bound for AllocatedByteSize(c) where `c` is of type `C` -// and `c.size()` is equal to `num_elements`. -template <typename C> -size_t LowerBoundAllocatedByteSize(size_t num_elements) { - return absl::container_internal::hashtable_debug_internal:: - HashtableDebugAccess<C>::LowerBoundAllocatedByteSize(num_elements); -} - } // namespace container_internal ABSL_NAMESPACE_END } // namespace absl diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 9d789b48..bcd889a0 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2914,18 +2914,6 @@ struct HashtableDebugAccess<Set, absl::void_t<typename Set::raw_hash_set>> { } return m; } - - static size_t LowerBoundAllocatedByteSize(size_t size) { - size_t capacity = GrowthToLowerboundCapacity(size); - if (capacity == 0) return 0; - size_t m = AllocSize(NormalizeCapacity(capacity), sizeof(Slot), - alignof(Slot), /*has_infoz=*/false); - size_t per_slot = Traits::space_used(static_cast<const Slot*>(nullptr)); - if (per_slot != ~size_t{}) { - m += per_slot * size; - } - return m; - } }; } // namespace hashtable_debug_internal |