Home
last modified time | relevance | path

Searched refs:kAlignment (Results 1 – 25 of 33) sorted by relevance

12

/art/libartbase/base/
Darena_allocator_test.cc141 for (size_t size = 1; size <= ArenaAllocator::kAlignment + 1; ++size) { in TEST_F()
143 EXPECT_TRUE(IsAligned<ArenaAllocator::kAlignment>(allocation)) in TEST_F()
158 const size_t original_size = ArenaAllocator::kAlignment * 2; in TEST_F()
161 const size_t new_size = ArenaAllocator::kAlignment * 3; in TEST_F()
171 const size_t original_size = ArenaAllocator::kAlignment * 2; in TEST_F()
174 const size_t new_size = ArenaAllocator::kAlignment * 2 + (ArenaAllocator::kAlignment / 2); in TEST_F()
184 const size_t original_size = ArenaAllocator::kAlignment * 2 + (ArenaAllocator::kAlignment / 2); in TEST_F()
187 const size_t new_size = ArenaAllocator::kAlignment * 4; in TEST_F()
197 const size_t original_size = ArenaAllocator::kAlignment * 2 + (ArenaAllocator::kAlignment / 2); in TEST_F()
200 const size_t new_size = ArenaAllocator::kAlignment * 3; in TEST_F()
[all …]
Dscoped_arena_allocator.h73 static constexpr size_t kAlignment = 8u; variable
102 size_t rounded_bytes = RoundUp(bytes + (kIsDebugBuild ? kAlignment : 0u), kAlignment); in Alloc()
110 ptr += kAlignment; in Alloc()
Darena_allocator.h273 bytes = RoundUp(bytes, kAlignment);
279 DCHECK_ALIGNED(ret, kAlignment);
313 const size_t aligned_ptr_size = RoundUp(ptr_size, kAlignment);
319 const size_t aligned_new_size = RoundUp(new_size, kAlignment);
326 DCHECK_ALIGNED(ptr_, kAlignment);
377 static constexpr size_t kAlignment = 8u; variable
/art/runtime/gc/accounting/
Dspace_bitmap.cc37 template<size_t kAlignment>
38 size_t SpaceBitmap<kAlignment>::ComputeBitmapSize(uint64_t capacity) { in ComputeBitmapSize()
42 const uint64_t kBytesCoveredPerWord = kAlignment * kBitsPerIntPtrT; in ComputeBitmapSize()
48 template<size_t kAlignment>
49 size_t SpaceBitmap<kAlignment>::ComputeHeapSize(uint64_t bitmap_bytes) { in ComputeHeapSize()
50 return bitmap_bytes * kBitsPerByte * kAlignment; in ComputeHeapSize()
53 template<size_t kAlignment>
54 SpaceBitmap<kAlignment> SpaceBitmap<kAlignment>::CreateFromMemMap( in CreateFromMemMap()
62 template<size_t kAlignment>
63 SpaceBitmap<kAlignment>::SpaceBitmap(const std::string& name, in SpaceBitmap()
[all …]
Dspace_bitmap-inl.h33 template<size_t kAlignment>
34 inline bool SpaceBitmap<kAlignment>::AtomicTestAndSet(const mirror::Object* obj) { in AtomicTestAndSet()
55 template<size_t kAlignment>
56 inline bool SpaceBitmap<kAlignment>::Test(const mirror::Object* obj) const { in Test()
66 template<size_t kAlignment>
67 inline mirror::Object* SpaceBitmap<kAlignment>::FindPrecedingObject(uintptr_t visit_begin, in FindPrecedingObject()
88 return reinterpret_cast<mirror::Object*>(ptr_base + pos_leading_set_bit * kAlignment); in FindPrecedingObject()
97 return reinterpret_cast<mirror::Object*>(ptr_base + pos_leading_set_bit * kAlignment); in FindPrecedingObject()
103 template<size_t kAlignment>
105 inline void SpaceBitmap<kAlignment>::VisitMarkedRange(uintptr_t visit_begin, in VisitMarkedRange()
[all …]
Dbitmap.cc83 template<size_t kAlignment>
84 MemoryRangeBitmap<kAlignment>* MemoryRangeBitmap<kAlignment>::Create( in Create()
86 CHECK_ALIGNED(cover_begin, kAlignment); in Create()
87 CHECK_ALIGNED(cover_end, kAlignment); in Create()
88 const size_t num_bits = (cover_end - cover_begin) / kAlignment; in Create()
94 template<size_t kAlignment>
95 MemoryRangeBitmap<kAlignment>* MemoryRangeBitmap<kAlignment>::CreateFromMemMap( in CreateFromMemMap()
102 template class MemoryRangeBitmap<collector::MarkCompact::kAlignment>;
Dbitmap.h128 template<size_t kAlignment>
137 CHECK_ALIGNED(bytes, kAlignment); in SetBitmapSize()
138 bitmap_numbits_ = bytes / kAlignment; in SetBitmapSize()
151 return cover_begin_ + kAlignment * BitmapSize(); in CoverEnd()
156 const uintptr_t addr = CoverBegin() + bit_index * kAlignment; in AddrFromBitIndex()
163 uintptr_t result = (addr - CoverBegin()) / kAlignment; in BitIndexFromAddr()
173 bool ret = (addr - CoverBegin()) / kAlignment < BitmapSize(); in HasAddress()
Dspace_bitmap.h40 template<size_t kAlignment>
70 return offset / kAlignment / kBitsPerIntPtrT; in OffsetToIndex()
77 return static_cast<T>(index * kAlignment * kBitsPerIntPtrT); in IndexToOffset()
84 return (offset / kAlignment) % kBitsPerIntPtrT; in OffsetBitIndex()
133 for (; visit_begin < visit_end; visit_begin += kAlignment) { in VisitRange()
294 template<size_t kAlignment>
295 std::ostream& operator << (std::ostream& stream, const SpaceBitmap<kAlignment>& bitmap);
Dcard_table.h42 template<size_t kAlignment> class SpaceBitmap;
Dspace_bitmap_test.cc40 template <typename T, size_t kAlignment>
44 return kAlignment; in GetObjectAlignment()
/art/runtime/gc/collector/
Dmark_compact-inl.h68 template <size_t kAlignment>
69 inline uintptr_t MarkCompact::LiveWordsBitmap<kAlignment>::SetLiveWords(uintptr_t begin, in SetLiveWords()
74 uintptr_t end = begin + size - kAlignment; in SetLiveWords()
98 template <size_t kAlignment> template <typename Visitor>
99 inline void MarkCompact::LiveWordsBitmap<kAlignment>::VisitLiveStrides(uintptr_t begin_bit_idx, in VisitLiveStrides()
104 DCHECK(IsAligned<kAlignment>(end)); in VisitLiveStrides()
105 end -= kAlignment; in VisitLiveStrides()
113 size_t num_heap_words = bytes / kAlignment; in VisitLiveStrides()
188 template <size_t kAlignment>
190 uint32_t MarkCompact::LiveWordsBitmap<kAlignment>::FindNthLiveWordOffset(size_t chunk_idx, in FindNthLiveWordOffset()
[all …]
Dmark_compact.cc416 template <size_t kAlignment>
417 MarkCompact::LiveWordsBitmap<kAlignment>* MarkCompact::LiveWordsBitmap<kAlignment>::Create( in Create()
419 return static_cast<LiveWordsBitmap<kAlignment>*>( in Create()
496 live_words_bitmap_.reset(LiveWordsBitmap<kAlignment>::Create( in MarkCompact()
902 obj = reinterpret_cast<mirror::Object*>(heap_begin + offset * kAlignment); in InitMovingSpaceFirstObjects()
925 DCHECK(IsAligned<kAlignment>(chunk_info_vec_[chunk_idx] - page_live_bytes)); in InitMovingSpaceFirstObjects()
928 chunk_idx, (chunk_info_vec_[chunk_idx] - page_live_bytes) / kAlignment); in InitMovingSpaceFirstObjects()
933 << " N=" << ((chunk_info_vec_[chunk_idx] - page_live_bytes) / kAlignment) in InitMovingSpaceFirstObjects()
942 obj = moving_space_bitmap_->FindPrecedingObject(heap_begin + offset * kAlignment); in InitMovingSpaceFirstObjects()
975 + RoundUp(prev_obj->SizeOf<kDefaultVerifyFlags>(), kAlignment); in InitNonMovingSpaceFirstObjects()
[all …]
Dmark_compact.h61 static constexpr size_t kAlignment = kObjectAlignment; variable
187 static constexpr uint32_t kOffsetChunkSize = kBitsPerVectorWord * kAlignment;
193 template <size_t kAlignment>
194 class LiveWordsBitmap : private accounting::MemoryRangeBitmap<kAlignment> {
196 using MemRangeBitmap = accounting::MemoryRangeBitmap<kAlignment>;
635 std::unique_ptr<LiveWordsBitmap<kAlignment>> live_words_bitmap_;
/art/runtime/gc/space/
Dbump_pointer_space-inl.h32 num_bytes = RoundUp(num_bytes, kAlignment); in Alloc()
49 num_bytes = RoundUp(num_bytes, kAlignment); in AllocThreadUnsafe()
70 DCHECK_ALIGNED(num_bytes, kAlignment); in AllocNonvirtualWithoutAccounting()
95 return reinterpret_cast<mirror::Object*>(RoundUp(position, kAlignment)); in GetNextObject()
Dbump_pointer_space.cc225 bytes = RoundUp(bytes, kAlignment); in AllocNewTlab()
254 *usable_size = RoundUp(num_bytes, kAlignment); in AllocationSizeNonvirtual()
261 DCHECK(IsAligned<kAlignment>(alignment)); in AlignEnd()
302 DCHECK(IsAligned<kAlignment>(size)); in SetBlockSizes()
Dregion_space-inl.h34 num_bytes = RoundUp(num_bytes, kAlignment); in Alloc()
53 DCHECK_ALIGNED(num_bytes, kAlignment); in AllocNonvirtual()
102 DCHECK_ALIGNED(num_bytes, kAlignment); in Alloc()
307 return reinterpret_cast<mirror::Object*>(RoundUp(position, kAlignment)); in GetNextObject()
315 DCHECK_ALIGNED(num_bytes, kAlignment); in AllocLarge()
Dregion_space.cc145 DCHECK(full_region_.Alloc(kAlignment, &ignored, nullptr, &ignored) == nullptr); in RegionSpace()
645 DCHECK_ALIGNED(obj, kAlignment); in CheckLiveBytesAgainstRegionBitmap()
658 size_t alloc_size = RoundUp(obj_size, space::RegionSpace::kAlignment); in CheckLiveBytesAgainstRegionBitmap()
674 IsPowerOfTwo(RegionSpace::kAlignment) && in PoisonUnevacuatedRange()
675 (kPoisonDeadObjectSize < RegionSpace::kAlignment), in PoisonUnevacuatedRange()
699 DCHECK_ALIGNED(obj, kAlignment); in PoisonDeadObjectsInUnevacuatedRegion()
999 prev_object_end = RoundUp(object_end, kAlignment); in GetLongestConsecutiveFreeBytes()
1012 *usable_size = RoundUp(num_bytes, kAlignment); in AllocationSizeNonvirtual()
Dbump_pointer_space.h169 static constexpr size_t kAlignment = kObjectAlignment; variable
/art/runtime/
Dlinear_alloc.h74 static constexpr size_t kAlignment = 8u;
75 static_assert(kAlignment >= ArenaAllocator::kAlignment);
76 static_assert(sizeof(TrackingHeader) == ArenaAllocator::kAlignment);
/art/runtime/gc/
Dheap-inl.h116 byte_count = RoundUp(byte_count, space::BumpPointerSpace::kAlignment); in AllocObjectWithAllocator()
317 alloc_size = RoundUp(alloc_size, space::BumpPointerSpace::kAlignment); in TryToAllocate()
397 alloc_size = RoundUp(alloc_size, space::RegionSpace::kAlignment); in TryToAllocate()
408 static_assert(space::RegionSpace::kAlignment == space::BumpPointerSpace::kAlignment, in TryToAllocate()
410 static_assert(kObjectAlignment == space::BumpPointerSpace::kAlignment, in TryToAllocate()
/art/libdexfile/dex/
Dcompact_offset_table.h64 static constexpr size_t kAlignment = sizeof(uint32_t); variable
Dstandard_dex_file.h39 static constexpr size_t kAlignment = 4; member
Ddex_file_structs.h197 static constexpr size_t kAlignment = sizeof(uint32_t); member
/art/runtime/entrypoints/quick/
Dquick_alloc_entrypoints.cc52 static_assert(kObjectAlignment == gc::space::BumpPointerSpace::kAlignment, "Alignment check"); in artAllocObjectFromCode()
53 DCHECK_ALIGNED(byte_count, gc::space::BumpPointerSpace::kAlignment); in artAllocObjectFromCode()
/art/runtime/jit/
Djit_code_cache.h55 template<size_t kAlignment> class MemoryRangeBitmap;
67 template<size_t kAlignment> class MemoryRangeBitmap;

12