Chromium Code Reviews| Index: base/security_unittest.cc |
| diff --git a/base/security_unittest.cc b/base/security_unittest.cc |
| index a7e3bc4bd6e72e95097fa198702337a7664fc7ac..5625129730e62d63c07c0870b0cd349028c3a939 100644 |
| --- a/base/security_unittest.cc |
| +++ b/base/security_unittest.cc |
| @@ -42,7 +42,8 @@ int OnNoMemory(size_t) { |
| void ExhaustMemoryWithMalloc() { |
| for (;;) { |
| - void* buf = malloc(kLargePermittedAllocation); |
| + // Without the |volatile|, clang optimizez away the allocation. |
|
scottmg
2015/01/22 19:46:21
optimizes
Will Harris
2015/01/22 19:46:45
ah. interesting. We actually have HideValueFromCo
Nico
2015/01/22 19:48:31
What's wrong with volatile? That's kind of the lan
Nico
2015/01/22 19:48:31
Done.
|
| + void* volatile buf = malloc(kLargePermittedAllocation); |
| if (!buf) |
| break; |
| } |