Commit 7cf2f122 authored by hans's avatar hans Committed by Commit bot

Allocate memory in smaller chunks for chrome://memory-exhaust/

The memory-exhaustion loop could cause DbgHelp's SymFromAddr() to hang
in certain build configs (32-bit Windows Clang debug builds), causing
MetricsServiceBrowserTest.OOMRenderers to hang while generating the
backtrace after the OOM exception. Reducing the allocation size seems to
help.

BUG=692564
TBR=jochen

Review-Url: https://codereview.chromium.org/2882513003
Cr-Commit-Position: refs/heads/master@{#471138}
parent fe27ed66
...@@ -775,7 +775,7 @@ double ConvertToBlinkTime(const base::TimeTicks& time_ticks) { ...@@ -775,7 +775,7 @@ double ConvertToBlinkTime(const base::TimeTicks& time_ticks) {
NOINLINE void ExhaustMemory() { NOINLINE void ExhaustMemory() {
volatile void* ptr = nullptr; volatile void* ptr = nullptr;
do { do {
ptr = malloc(0x10000000); ptr = malloc(0x1000000);
base::debug::Alias(&ptr); base::debug::Alias(&ptr);
} while (ptr); } while (ptr);
} }
......
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