Skip to content

Commit

Permalink
Remove the unused LowerBoundAllocatedByteSize function.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 562832827
Change-Id: If37f83e67b3b2ea350f74dd6bffae51ea5508f12
  • Loading branch information
ezbr authored and copybara-github committed Sep 5, 2023
1 parent 5c9f72f commit 415a1d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
8 changes: 0 additions & 8 deletions absl/container/internal/hashtable_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions absl/container/internal/raw_hash_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 415a1d1

Please sign in to comment.