Commit 415a1d1c by Evan Brown Committed by Copybara-Service

Remove the unused LowerBoundAllocatedByteSize function.

PiperOrigin-RevId: 562832827
Change-Id: If37f83e67b3b2ea350f74dd6bffae51ea5508f12
parent 5c9f72fa
...@@ -95,14 +95,6 @@ size_t AllocatedByteSize(const C& c) { ...@@ -95,14 +95,6 @@ size_t AllocatedByteSize(const C& c) {
HashtableDebugAccess<C>::AllocatedByteSize(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 } // namespace container_internal
ABSL_NAMESPACE_END ABSL_NAMESPACE_END
} // namespace absl } // namespace absl
......
...@@ -2914,18 +2914,6 @@ struct HashtableDebugAccess<Set, absl::void_t<typename Set::raw_hash_set>> { ...@@ -2914,18 +2914,6 @@ struct HashtableDebugAccess<Set, absl::void_t<typename Set::raw_hash_set>> {
} }
return m; 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 } // namespace hashtable_debug_internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment