Skip to content

Commit c948d9a

Browse files
Snehasish Kumarcopybara-github
authored andcommitted
Revert: Raise minimum threshold for treating an allocation as cold.
PiperOrigin-RevId: 769316427 Change-Id: I309f57a4d740c4421a971f0b1301b00f6c7cbdb2
1 parent 6792dec commit c948d9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tcmalloc/malloc_extension.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace tcmalloc {
6565
using hot_cold_t = __hot_cold_t;
6666

6767
constexpr hot_cold_t kDefaultMinHotAccessHint =
68-
static_cast<tcmalloc::hot_cold_t>(2);
68+
static_cast<tcmalloc::hot_cold_t>(1);
6969

7070
} // namespace tcmalloc
7171

tcmalloc/testing/get_stats_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TEST_F(GetStatsTest, Pbtxt) {
137137
}
138138

139139
EXPECT_THAT(buf, HasSubstr("tcmalloc_release_pages_from_huge_region: true"));
140-
EXPECT_THAT(buf, HasSubstr("min_hot_access_hint: 2"));
140+
EXPECT_THAT(buf, HasSubstr("min_hot_access_hint: 1"));
141141

142142
sized_delete(alloc, kSize);
143143
}
@@ -244,7 +244,7 @@ TEST_F(GetStatsTest, Parameters) {
244244
pbtxt,
245245
HasSubstr(
246246
R"(tcmalloc_cache_demand_release_long_interval_ns: 5000000000)"));
247-
EXPECT_THAT(pbtxt, HasSubstr(R"(min_hot_access_hint: 2)"));
247+
EXPECT_THAT(pbtxt, HasSubstr(R"(min_hot_access_hint: 1)"));
248248
}
249249

250250
Parameters::set_hpaa_subrelease(true);

0 commit comments

Comments
 (0)