| OLD | NEW |
| 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/gc_sweeper.h" | 5 #include "vm/gc_sweeper.h" |
| 6 | 6 |
| 7 #include "vm/freelist.h" | 7 #include "vm/freelist.h" |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/pages.h" | 9 #include "vm/pages.h" |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 current += obj_size; | 55 current += obj_size; |
| 56 } | 56 } |
| 57 | 57 |
| 58 return in_use_swept; | 58 return in_use_swept; |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 intptr_t GCSweeper::SweepLargePage(HeapPage* page) { | 62 intptr_t GCSweeper::SweepLargePage(HeapPage* page) { |
| 63 UNIMPLEMENTED(); | 63 RawObject* raw_obj = RawObject::FromAddr(page->first_object_start()); |
| 64 return 0; | 64 if (!raw_obj->IsMarked()) { |
| 65 // The large object was not marked. Used size is zero, which also tells the |
| 66 // calling code that the large object page can be recycled. |
| 67 return 0; |
| 68 } |
| 69 raw_obj->ClearMarkBit(); |
| 70 return raw_obj->Size(); |
| 65 } | 71 } |
| 66 | 72 |
| 67 } // namespace dart | 73 } // namespace dart |
| OLD | NEW |