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

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

Issue 2930943002: Debug garbage collector does not correctly remove cross-gen garbage (Closed)
Patch Set: Created 3 years, 6 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
« runtime/vm/heap.h ('K') | « runtime/vm/scavenger.h ('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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 external_size_ += size; 889 external_size_ += size;
890 } 890 }
891 891
892 892
893 void Scavenger::FreeExternal(intptr_t size) { 893 void Scavenger::FreeExternal(intptr_t size) {
894 ASSERT(size >= 0); 894 ASSERT(size >= 0);
895 external_size_ -= size; 895 external_size_ -= size;
896 ASSERT(external_size_ >= 0); 896 ASSERT(external_size_ >= 0);
897 } 897 }
898 898
899 void Scavenger::UnmarkNewSpace() {
900 uword cur = FirstObjectStart();
901 while (cur < top_) {
902 RawObject* raw_obj = RawObject::FromAddr(cur);
903 if (raw_obj->IsMarked() && !raw_obj->IsVMHeapObject()) {
904 raw_obj->ClearMarkBit();
905 }
906 cur += raw_obj->Size();
907 }
908 }
909
899 } // namespace dart 910 } // namespace dart
OLDNEW
« runtime/vm/heap.h ('K') | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698