summaryrefslogtreecommitdiff
path: root/runtime/gc/heap_test.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2019-07-30 09:47:35 -0700
committer Mathieu Chartier <mathieuc@google.com> 2019-08-01 16:17:17 +0000
commit6f382013399fc8ba8b2717e4d24d91978d2bc0f7 (patch)
tree53b6bca63d5a1c34b2a60e5d8ef39f7cb22d4fe9 /runtime/gc/heap_test.cc
parent2b9c8c94fc92c6f2c7c1703efc1793d17ffde297 (diff)
Refactor space bitmap to be a value object
Remove the need for pointer indirections at many places, reduce the amount of code. Bug: 116052292 Test: test-art-host Change-Id: I4b1040d29f9ba99ea23c51f70a06af2ffbe496d4
Diffstat (limited to 'runtime/gc/heap_test.cc')
-rw-r--r--runtime/gc/heap_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc
index 5f4621e6f1..817c87681d 100644
--- a/runtime/gc/heap_test.cc
+++ b/runtime/gc/heap_test.cc
@@ -87,11 +87,11 @@ TEST_F(HeapTest, GarbageCollectClassLinkerInit) {
TEST_F(HeapTest, HeapBitmapCapacityTest) {
uint8_t* heap_begin = reinterpret_cast<uint8_t*>(0x1000);
const size_t heap_capacity = kObjectAlignment * (sizeof(intptr_t) * 8 + 1);
- std::unique_ptr<accounting::ContinuousSpaceBitmap> bitmap(
+ accounting::ContinuousSpaceBitmap bitmap(
accounting::ContinuousSpaceBitmap::Create("test bitmap", heap_begin, heap_capacity));
mirror::Object* fake_end_of_heap_object =
reinterpret_cast<mirror::Object*>(&heap_begin[heap_capacity - kObjectAlignment]);
- bitmap->Set(fake_end_of_heap_object);
+ bitmap.Set(fake_end_of_heap_object);
}
TEST_F(HeapTest, DumpGCPerformanceOnShutdown) {