Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2882513003: Allocate memory in smaller chunks for chrome://memory-exhaust/ (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 return (time_ticks - base::TimeTicks()).InSecondsF(); 768 return (time_ticks - base::TimeTicks()).InSecondsF();
769 } 769 }
770 770
771 } // namespace 771 } // namespace
772 772
773 // The following methods are outside of the anonymous namespace to ensure that 773 // The following methods are outside of the anonymous namespace to ensure that
774 // the corresponding symbols get emmitted even on symbol_level 1. 774 // the corresponding symbols get emmitted even on symbol_level 1.
775 NOINLINE void ExhaustMemory() { 775 NOINLINE void ExhaustMemory() {
776 volatile void* ptr = nullptr; 776 volatile void* ptr = nullptr;
777 do { 777 do {
778 ptr = malloc(0x10000000); 778 ptr = malloc(0x1000000);
779 base::debug::Alias(&ptr); 779 base::debug::Alias(&ptr);
780 } while (ptr); 780 } while (ptr);
781 } 781 }
782 782
783 NOINLINE void CrashIntentionally() { 783 NOINLINE void CrashIntentionally() {
784 // NOTE(shess): Crash directly rather than using NOTREACHED() so 784 // NOTE(shess): Crash directly rather than using NOTREACHED() so
785 // that the signature is easier to triage in crash reports. 785 // that the signature is easier to triage in crash reports.
786 // 786 //
787 // Linker's ICF feature may merge this function with other functions with the 787 // Linker's ICF feature may merge this function with other functions with the
788 // same definition and it may confuse the crash report processing system. 788 // same definition and it may confuse the crash report processing system.
(...skipping 6286 matching lines...) Expand 10 before | Expand all | Expand 10 after
7075 policy(info.default_policy), 7075 policy(info.default_policy),
7076 replaces_current_history_item(info.replaces_current_history_item), 7076 replaces_current_history_item(info.replaces_current_history_item),
7077 history_navigation_in_new_child_frame( 7077 history_navigation_in_new_child_frame(
7078 info.is_history_navigation_in_new_child_frame), 7078 info.is_history_navigation_in_new_child_frame),
7079 client_redirect(info.is_client_redirect), 7079 client_redirect(info.is_client_redirect),
7080 cache_disabled(info.is_cache_disabled), 7080 cache_disabled(info.is_cache_disabled),
7081 form(info.form), 7081 form(info.form),
7082 source_location(info.source_location) {} 7082 source_location(info.source_location) {}
7083 7083
7084 } // namespace content 7084 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698