summaryrefslogtreecommitdiffstats
path: root/runtime/gc/accounting/card_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/accounting/card_table.cc')
-rw-r--r--runtime/gc/accounting/card_table.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/accounting/card_table.cc b/runtime/gc/accounting/card_table.cc
index 7818bc8..e099137 100644
--- a/runtime/gc/accounting/card_table.cc
+++ b/runtime/gc/accounting/card_table.cc
@@ -95,8 +95,8 @@ void CardTable::ClearSpaceCards(space::ContinuousSpace* space) {
}
void CardTable::ClearCardTable() {
- // TODO: clear just the range of the table that has been modified
- memset(mem_map_->Begin(), kCardClean, mem_map_->Size());
+ COMPILE_ASSERT(kCardClean == 0, clean_card_must_be_0);
+ madvise(mem_map_->Begin(), mem_map_->Size(), MADV_DONTNEED);
}
bool CardTable::AddrIsInCardTable(const void* addr) const {