Skip to content

Commit 5c2d24b

Browse files
ArthurSonzognicopybara-github
authored andcommitted
PA: Suppress REALLOC_GROWTH_FACTOR_MITIGATION limit.
This patch is behind build flags. It has no impacts on Chrome. The growth factor was previously applied starting from 12MB allocations. Instrumentation on Skia reveal this was too high and the nVidia performance issue wasn't fixed. We need to suppress it, or at least to make it lower. Indeed, assuming we memory is reallocated repeated from 0 to 12MB, using 4144 byte increment, we get currently get ~3036 iterations instead of ~20: - Prev: 12*1024*1024/4144 = ~3036 iterations. - Next: (log(12*1024*1024) - log(4144)) / log(1.5) = ~20 iterations. Bug: 351867706 Change-Id: If3f5365404f28e926b6e776a4260946949a15324 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6818351 Commit-Queue: Daniel Cheng <[email protected]> Auto-Submit: Arthur Sonzogni <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Cr-Commit-Position: refs/heads/main@{#1497709} NOKEYCHECK=True GitOrigin-RevId: 4bf11a8bcc9e9f2a04aca5cdfad1d55fd98790a9
1 parent 356065b commit 5c2d24b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/partition_alloc/partition_root.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,7 @@ void* PartitionRoot::ReallocInline(void* ptr,
24242424
// factor to the new size to avoid this issue. This workaround is only
24252425
// intended to be used for Skia bots, and is not intended to be a general
24262426
// solution.
2427-
if (new_size > old_usable_size && new_size > 12 << 20) {
2427+
if (new_size > old_usable_size) {
24282428
// 1.5x growth factor.
24292429
// Note that in case of integer overflow, the std::max ensures that the
24302430
// new_size is at least as large as the old_usable_size.

0 commit comments

Comments
 (0)