diff options
Diffstat (limited to 'runtime/gc/accounting/card_table.cc')
-rw-r--r-- | runtime/gc/accounting/card_table.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/gc/accounting/card_table.cc b/runtime/gc/accounting/card_table.cc index 85034a0..7818bc8 100644 --- a/runtime/gc/accounting/card_table.cc +++ b/runtime/gc/accounting/card_table.cc @@ -54,9 +54,11 @@ CardTable* CardTable::Create(const byte* heap_begin, size_t heap_capacity) { /* Set up the card table */ size_t capacity = heap_capacity / kCardSize; /* Allocate an extra 256 bytes to allow fixed low-byte of base */ + std::string error_msg; UniquePtr<MemMap> mem_map(MemMap::MapAnonymous("card table", NULL, - capacity + 256, PROT_READ | PROT_WRITE)); - CHECK(mem_map.get() != NULL) << "couldn't allocate card table"; + capacity + 256, PROT_READ | PROT_WRITE, + &error_msg)); + CHECK(mem_map.get() != NULL) << "couldn't allocate card table: " << error_msg; // All zeros is the correct initial value; all clean. Anonymous mmaps are initialized to zero, we // don't clear the card table to avoid unnecessary pages being allocated COMPILE_ASSERT(kCardClean == 0, card_clean_must_be_0); |