Skip to content

Commit ec56365

Browse files
TCMalloc Teamcopybara-github
authored andcommitted
Increase buffer sizes in TCMalloc tests.
We are nearing these limits, and the tests are becoming flakey PiperOrigin-RevId: 831376536 Change-Id: I2ed89d4269088e52f0694f2775421a67875874a0
1 parent 010468f commit ec56365

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tcmalloc/testing/reclaim_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ TEST(ReclaimTest, ReclaimWorks) {
9393
// Allocate strings, so that they don't need to be reallocated below, and so
9494
// don't perturb what we're trying to measure.
9595
//
96-
// As of December 2024, this size, plus the null terminator on the
96+
// As of November 2025, this size, plus the null terminator on the
9797
// std::string, is well outside of the size classes used by TCMalloc, so a
9898
// resize will not perturb the per-CPU cache.
99-
before.reserve(1 << 20);
100-
after.reserve(1 << 20);
99+
before.reserve(1 << 21);
100+
after.reserve(1 << 21);
101101

102102
// Generate some traffic to fill up caches.
103103
const int kThreads = 10;

tcmalloc/testing/testutil.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int VirtualCpu::TestSynchronize() { return ScopedFakeCpuId::test_vcpu_; }
8383

8484
std::string GetStatsInPbTxt() {
8585
// When huge page telemetry is enabled, the output can become very large.
86-
const int buffer_length = 3 << 20;
86+
const int buffer_length = 3 << 21;
8787
std::string buf;
8888
if (&MallocExtension_Internal_GetStatsInPbtxt == nullptr) {
8989
return buf;

0 commit comments

Comments
 (0)