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

Side by Side Diff: runtime/vm/scavenger.cc

Issue 2383293003: - fix some cases where we are using uninitialized memory (Closed)
Patch Set: Fix lint issue. Created 4 years, 2 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 | « runtime/vm/os_linux.cc ('k') | 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include "vm/dart.h" 7 #include "vm/dart.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 // Setup local fields. 352 // Setup local fields.
353 top_ = FirstObjectStart(); 353 top_ = FirstObjectStart();
354 resolved_top_ = top_; 354 resolved_top_ = top_;
355 end_ = to_->end(); 355 end_ = to_->end();
356 356
357 survivor_end_ = FirstObjectStart(); 357 survivor_end_ = FirstObjectStart();
358 358
359 UpdateMaxHeapCapacity(); 359 UpdateMaxHeapCapacity();
360 UpdateMaxHeapUsage(); 360 UpdateMaxHeapUsage();
361 if (heap_ != NULL) {
362 heap_->UpdateGlobalMaxUsed();
363 }
364 } 361 }
365 362
366 363
367 Scavenger::~Scavenger() { 364 Scavenger::~Scavenger() {
368 ASSERT(!scavenging_); 365 ASSERT(!scavenging_);
369 to_->Delete(); 366 to_->Delete();
370 } 367 }
371 368
372 369
373 intptr_t Scavenger::NewSizeInWords(intptr_t old_size_in_words) const { 370 intptr_t Scavenger::NewSizeInWords(intptr_t old_size_in_words) const {
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 } 900 }
904 901
905 902
906 void Scavenger::FreeExternal(intptr_t size) { 903 void Scavenger::FreeExternal(intptr_t size) {
907 ASSERT(size >= 0); 904 ASSERT(size >= 0);
908 external_size_ -= size; 905 external_size_ -= size;
909 ASSERT(external_size_ >= 0); 906 ASSERT(external_size_ >= 0);
910 } 907 }
911 908
912 } // namespace dart 909 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/os_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698