summaryrefslogtreecommitdiffstats
path: root/courgette/adjustment_method_2.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 17:42:45 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 17:42:45 +0000
commit43a9e24a52fa867db98fc2195b8db85b4729e7a1 (patch)
treecad7a14c415542083ac3d1ecc2df1fd86f789557 /courgette/adjustment_method_2.cc
parent6768ac0b06ae36ec7b2d27adfb9b64fc17f57cee (diff)
downloadchromium_src-43a9e24a52fa867db98fc2195b8db85b4729e7a1.zip
chromium_src-43a9e24a52fa867db98fc2195b8db85b4729e7a1.tar.gz
chromium_src-43a9e24a52fa867db98fc2195b8db85b4729e7a1.tar.bz2
Switch out use of std::string and std::vector for large allocations for a buffer class that doesn't throw exceptions.
The new buffer class is pretty simple and relies on the MemoryAllocator class that I previously to back large allocations with mapped files when memory is scarce. That reduced the number of crashes quite a bit but we still crash on machines that are simply out of diskspace as well. So, the right thing to do is to expect and handle failures which is what this cl is all about. What we should see once this has landed is that crash dumps due to courgette running out of disk space should disappear from crash/ and instead we should see the number of users that run into this particular problem in dashboards. TEST=Courgette out-of-memory/out-of-diskspace errors should disappear from crash/ BUG=74777 Review URL: http://codereview.chromium.org/6677141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/adjustment_method_2.cc')
-rw-r--r--courgette/adjustment_method_2.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index 4a3d1c1..e4fd716 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1254,7 +1254,7 @@ class Adjuster : public AdjustmentMethod {
label_info_maker_.ResetDebugLabel();
const InstructionVector& instructions = program->instructions();
for (size_t i = 0; i < instructions.size(); ++i) {
- Instruction* instruction = instructions.at(i);
+ Instruction* instruction = instructions[i];
if (Label* label = program->InstructionAbs32Label(instruction))
ReferenceLabel(abs32, label, is_model);
if (Label* label = program->InstructionRel32Label(instruction))