/art/runtime/ |
D | linear_alloc.cc | 26 void* LinearAlloc::Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) { in Realloc() argument 28 return allocator_.Realloc(ptr, old_size, new_size); in Realloc() 46 bool LinearAlloc::Contains(void* ptr) const { in Contains() 48 return allocator_.Contains(ptr); in Contains() 51 bool LinearAlloc::ContainsUnsafe(void* ptr) const { in ContainsUnsafe() 52 return allocator_.Contains(ptr); in ContainsUnsafe()
|
D | leb128.h | 32 const uint8_t* ptr = *data; in DecodeUnsignedLeb128() local 33 int result = *(ptr++); in DecodeUnsignedLeb128() 35 int cur = *(ptr++); in DecodeUnsignedLeb128() 38 cur = *(ptr++); in DecodeUnsignedLeb128() 41 cur = *(ptr++); in DecodeUnsignedLeb128() 46 cur = *(ptr++); in DecodeUnsignedLeb128() 52 *data = ptr; in DecodeUnsignedLeb128() 68 const uint8_t* ptr = *data; in DecodeSignedLeb128() local 69 int32_t result = *(ptr++); in DecodeSignedLeb128() 73 int cur = *(ptr++); in DecodeSignedLeb128() [all …]
|
D | utf_test.cc | 61 const char* ptr = start; in TEST_F() local 65 pair = GetUtf16FromUtf8(&ptr); in TEST_F() 68 EXPECT_ARRAY_POSITION(1, ptr, start); in TEST_F() 71 pair = GetUtf16FromUtf8(&ptr); in TEST_F() 74 EXPECT_ARRAY_POSITION(3, ptr, start); in TEST_F() 77 pair = GetUtf16FromUtf8(&ptr); in TEST_F() 80 EXPECT_ARRAY_POSITION(6, ptr, start); in TEST_F() 83 pair = GetUtf16FromUtf8(&ptr); in TEST_F() 86 EXPECT_ARRAY_POSITION(10, ptr, start); in TEST_F() 89 pair = GetUtf16FromUtf8(&ptr); in TEST_F() [all …]
|
D | linear_alloc.h | 34 void* Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) REQUIRES(!lock_); 48 bool Contains(void* ptr) const REQUIRES(!lock_); 52 bool ContainsUnsafe(void* ptr) const NO_THREAD_SAFETY_ANALYSIS;
|
D | dex_file-inl.h | 29 const uint8_t* ptr = begin_ + string_id.string_data_off_; in GetStringLength() local 30 return DecodeUnsignedLeb128(&ptr); in GetStringLength() 36 const uint8_t* ptr = begin_ + string_id.string_data_off_; in GetStringDataAndUtf16Length() local 37 *utf16_length = DecodeUnsignedLeb128(&ptr); in GetStringDataAndUtf16Length() 38 return reinterpret_cast<const char*>(ptr); in GetStringDataAndUtf16Length()
|
D | mem_map.cc | 136 bool MemMap::ContainedWithinExistingMap(uint8_t* ptr, size_t size, std::string* error_msg) { in ContainedWithinExistingMap() argument 137 uintptr_t begin = reinterpret_cast<uintptr_t>(ptr); in ContainedWithinExistingMap() 256 static inline void* TryMemMapLow4GB(void* ptr, in TryMemMapLow4GB() argument 262 void* actual = mmap(ptr, page_aligned_byte_count, prot, flags, fd, offset); in TryMemMapLow4GB() 804 for (uintptr_t ptr = next_mem_pos_; ptr < 4 * GB; ptr += kPageSize) { in MapInternal() local 807 auto it = maps_->upper_bound(reinterpret_cast<void*>(ptr)); in MapInternal() 812 ptr = std::max(ptr, reinterpret_cast<uintptr_t>(before_it->second->BaseEnd())); in MapInternal() 813 CHECK_ALIGNED(ptr, kPageSize); in MapInternal() 817 size_t delta = reinterpret_cast<uintptr_t>(it->first) - ptr; in MapInternal() 823 ptr = reinterpret_cast<uintptr_t>(it->second->BaseEnd()); in MapInternal() [all …]
|
D | oat.cc | 406 const char* ptr = reinterpret_cast<const char*>(&key_value_store_); in GetStoreValueByKey() local 407 const char* end = ptr + key_value_store_size_; in GetStoreValueByKey() 409 while (ptr < end) { in GetStoreValueByKey() 411 const char* str_end = ParseString(ptr, end); in GetStoreValueByKey() 413 if (strcmp(key, ptr) == 0) { in GetStoreValueByKey() 420 ptr = ParseString(str_end + 1, end) + 1; in GetStoreValueByKey() 432 const char* ptr = reinterpret_cast<const char*>(&key_value_store_); in GetStoreKeyValuePairByIndex() local 433 const char* end = ptr + key_value_store_size_; in GetStoreKeyValuePairByIndex() 436 while (ptr < end && counter >= 0) { in GetStoreKeyValuePairByIndex() 438 const char* str_end = ParseString(ptr, end); in GetStoreKeyValuePairByIndex() [all …]
|
D | class_table.cc | 161 size_t ClassTable::WriteToMemory(uint8_t* ptr) const { in WriteToMemory() 171 const size_t ret = combined.WriteToMemory(ptr); in WriteToMemory() 173 if (kIsDebugBuild && ptr != nullptr) { in WriteToMemory() 175 ClassSet class_set(ptr, /*make copy*/false, &read_count); in WriteToMemory() 181 size_t ClassTable::ReadFromMemory(uint8_t* ptr) { in ReadFromMemory() argument 183 AddClassSet(ClassSet(ptr, /*make copy*/false, &read_count)); in ReadFromMemory()
|
D | type_lookup_table.h | 125 const uint8_t* ptr = dex_file_.Begin() + str_offset; in IsStringsEquals() local 127 DecodeUnsignedLeb128(&ptr); in IsStringsEquals() 129 str, reinterpret_cast<const char*>(ptr)) == 0; in IsStringsEquals()
|
/art/runtime/base/ |
D | scoped_arena_allocator.h | 65 static ArenaFreeTag& ArenaTagForAllocation(void* ptr) { in ArenaTagForAllocation() argument 67 return *(reinterpret_cast<ArenaFreeTag*>(ptr) - 1); in ArenaTagForAllocation() 94 uint8_t* ptr = top_ptr_; in Alloc() local 95 if (UNLIKELY(static_cast<size_t>(top_end_ - ptr) < rounded_bytes)) { in Alloc() 96 ptr = AllocateFromNextArena(rounded_bytes); in Alloc() 99 top_ptr_ = ptr + rounded_bytes; in Alloc() 101 ptr += kArenaAlignment; in Alloc() 102 ArenaTagForAllocation(ptr) = ArenaFreeTag::kUsed; in Alloc() 104 return ptr; in Alloc() 168 static void operator delete(void* ptr ATTRIBUTE_UNUSED) {} in delete()
|
D | arena_allocator.h | 170 void MakeDefined(void* ptr, size_t size) { in MakeDefined() argument 172 DoMakeDefined(ptr, size); in MakeDefined() 175 void MakeUndefined(void* ptr, size_t size) { in MakeUndefined() argument 177 DoMakeUndefined(ptr, size); in MakeUndefined() 180 void MakeInaccessible(void* ptr, size_t size) { in MakeInaccessible() argument 182 DoMakeInaccessible(ptr, size); in MakeInaccessible() 187 void DoMakeDefined(void* ptr, size_t size); 188 void DoMakeUndefined(void* ptr, size_t size); 189 void DoMakeInaccessible(void* ptr, size_t size); 222 bool Contains(const void* ptr) const { in Contains() argument [all …]
|
D | scoped_arena_allocator.cc | 98 uint8_t* ptr = top_ptr_; in AllocWithMemoryTool() local 99 if (UNLIKELY(static_cast<size_t>(top_end_ - ptr) < rounded_bytes)) { in AllocWithMemoryTool() 100 ptr = AllocateFromNextArena(rounded_bytes); in AllocWithMemoryTool() 101 CHECK(ptr != nullptr) << "Failed to allocate memory"; in AllocWithMemoryTool() 102 MEMORY_TOOL_MAKE_NOACCESS(ptr, top_end_ - ptr); in AllocWithMemoryTool() 105 top_ptr_ = ptr + rounded_bytes; in AllocWithMemoryTool() 106 MEMORY_TOOL_MAKE_UNDEFINED(ptr, bytes); in AllocWithMemoryTool() 107 return ptr; in AllocWithMemoryTool()
|
D | scoped_arena_containers.h | 207 ALWAYS_INLINE void ProtectMemory(T* ptr, size_t size) const { in ProtectMemory() argument 211 memset(ptr, kMagicFill, size); in ProtectMemory() 212 MEMORY_TOOL_MAKE_NOACCESS(ptr, size); in ProtectMemory() 214 CHECK(ArenaStack::ArenaTagForAllocation(reinterpret_cast<void*>(ptr)) == ArenaFreeTag::kUsed) in ProtectMemory() 215 << "Freeing invalid object " << ptr; in ProtectMemory() 216 ArenaStack::ArenaTagForAllocation(reinterpret_cast<void*>(ptr)) = ArenaFreeTag::kFree; in ProtectMemory() 218 memset(ptr, kMagicFill, size); in ProtectMemory() 223 void operator()(T* ptr) const { in operator() 224 if (ptr != nullptr) { in operator() 225 ptr->~T(); in operator() [all …]
|
D | hash_set.h | 211 HashSet(const uint8_t* ptr, bool make_copy_of_data, size_t* read_count) noexcept { in HashSet() argument 214 offset = ReadFromBytes(ptr, offset, &temp); in HashSet() 216 offset = ReadFromBytes(ptr, offset, &temp); in HashSet() 219 offset = ReadFromBytes(ptr, offset, &temp); in HashSet() 221 offset = ReadFromBytes(ptr, offset, &min_load_factor_); in HashSet() 222 offset = ReadFromBytes(ptr, offset, &max_load_factor_); in HashSet() 225 data_ = const_cast<T*>(reinterpret_cast<const T*>(ptr + offset)); in HashSet() 232 offset = ReadFromBytes(ptr, offset, &data_[i]); in HashSet() 241 size_t WriteToMemory(uint8_t* ptr) const { in WriteToMemory() argument 243 offset = WriteToBytes(ptr, offset, static_cast<uint64_t>(num_elements_)); in WriteToMemory() [all …]
|
D | arena_allocator.cc | 148 void ArenaAllocatorMemoryTool::DoMakeDefined(void* ptr, size_t size) { in DoMakeDefined() argument 149 MEMORY_TOOL_MAKE_DEFINED(ptr, size); in DoMakeDefined() 152 void ArenaAllocatorMemoryTool::DoMakeUndefined(void* ptr, size_t size) { in DoMakeUndefined() argument 153 MEMORY_TOOL_MAKE_UNDEFINED(ptr, size); in DoMakeUndefined() 156 void ArenaAllocatorMemoryTool::DoMakeInaccessible(void* ptr, size_t size) { in DoMakeInaccessible() argument 157 MEMORY_TOOL_MAKE_NOACCESS(ptr, size); in DoMakeInaccessible() 379 bool ArenaAllocator::Contains(const void* ptr) const { in Contains() 380 if (ptr >= begin_ && ptr < end_) { in Contains() 384 if (cur_arena->Contains(ptr)) { in Contains()
|
D | variant_map.h | 235 auto* ptr = Get(key); in GetOrDefault() local 236 return (ptr == nullptr) ? key.CreateDefaultValue() : *ptr; in GetOrDefault() 259 TValue* ptr = Get(key); in ReleaseOrDefault() local 260 if (ptr != nullptr) { in ReleaseOrDefault() 261 return std::move(*ptr); in ReleaseOrDefault() 289 TValue* ptr = Get(key); in SetIfMissing() local 290 if (ptr == nullptr) { in SetIfMissing()
|
D | arena_object.h | 45 ALWAYS_INLINE void* operator new(size_t, void* ptr) noexcept { return ptr; }
|
/art/compiler/utils/ |
D | swap_space.cc | 74 if (munmap(chunk.ptr, chunk.size) != 0) { in ~SwapSpace() 76 << static_cast<const void*>(chunk.ptr) << " size=" << chunk.size; in ~SwapSpace() 125 void* ret = old_chunk.ptr; in Alloc() 129 SpaceChunk new_chunk = { old_chunk.ptr + size, old_chunk.size - size }; in Alloc() 143 uint8_t* ptr = reinterpret_cast<uint8_t*>( in NewFileChunk() local 145 if (ptr == MAP_FAILED) { in NewFileChunk() 154 SpaceChunk new_chunk = {ptr, next_part}; in NewFileChunk() 164 void SwapSpace::Free(void* ptr, size_t size) { in Free() argument 173 SpaceChunk chunk = { reinterpret_cast<uint8_t*>(ptr), size }; in Free() 182 chunk.ptr -= prev->size; in Free()
|
D | swap_space.h | 39 void Free(void* ptr, size_t size) REQUIRES(!lock_); 48 uint8_t* ptr; member 52 return reinterpret_cast<uintptr_t>(ptr); in Start() 55 return reinterpret_cast<uintptr_t>(ptr) + size; in End() 62 return reinterpret_cast<uintptr_t>(a.ptr) < reinterpret_cast<uintptr_t>(b.ptr); in operator()
|
/art/compiler/debug/dwarf/ |
D | writer.h | 117 void PushData(const uint8_t* ptr, size_t num_bytes) { in PushData() argument 118 data_->insert(data_->end(), ptr, ptr + num_bytes); in PushData() 121 void PushData(const char* ptr, size_t num_bytes) { in PushData() argument 122 data_->insert(data_->end(), ptr, ptr + num_bytes); in PushData()
|
/art/runtime/arch/arm/ |
D | fault_handler_arm.cc | 96 uint8_t* ptr = reinterpret_cast<uint8_t*>(sc->arm_pc); in GetMethodAndReturnPcAndSp() local 97 VLOG(signals) << "pc: " << std::hex << static_cast<void*>(ptr); in GetMethodAndReturnPcAndSp() 99 if (ptr == nullptr) { in GetMethodAndReturnPcAndSp() 105 uint32_t instr_size = GetInstructionSize(ptr); in GetMethodAndReturnPcAndSp() 121 uint8_t* ptr = reinterpret_cast<uint8_t*>(sc->arm_pc); in Action() local 123 uint32_t instr_size = GetInstructionSize(ptr); in Action()
|
/art/runtime/gc/space/ |
D | dlmalloc_space.cc | 167 size_t DlMallocSpace::Free(Thread* self, mirror::Object* ptr) { in Free() argument 170 CHECK(ptr != nullptr); in Free() 171 CHECK(Contains(ptr)) << "Free (" << ptr << ") not in bounds of heap " << *this; in Free() 173 const size_t bytes_freed = AllocationSizeNonvirtual(ptr, nullptr); in Free() 175 RegisterRecentFree(ptr); in Free() 177 mspace_free(mspace_, ptr); in Free() 187 mirror::Object* ptr = ptrs[i]; in FreeList() local 193 bytes_freed += AllocationSizeNonvirtual(ptr, nullptr); in FreeList()
|
/art/runtime/verifier/ |
D | register_line-inl.h | 195 inline void RegisterLineArenaDelete::operator()(RegisterLine* ptr) const { in operator() 196 if (ptr != nullptr) { in operator() 197 ptr->~RegisterLine(); in operator() 198 ProtectMemory(ptr, RegisterLine::ComputeSize(ptr->NumRegs())); in operator()
|
/art/runtime/gc/allocator/ |
D | rosalloc.cc | 302 size_t RosAlloc::FreePages(Thread* self, void* ptr, bool already_zero) { in FreePages() argument 304 size_t pm_idx = ToPageMapIndex(ptr); in FreePages() 319 << reinterpret_cast<intptr_t>(ptr); in FreePages() 335 const uintptr_t* word_ptr = reinterpret_cast<uintptr_t*>(ptr); in FreePages() 341 memset(ptr, 0, byte_size); in FreePages() 345 LOG(INFO) << __PRETTY_FUNCTION__ << " : 0x" << std::hex << reinterpret_cast<intptr_t>(ptr) in FreePages() 346 << "-0x" << (reinterpret_cast<intptr_t>(ptr) + byte_size) in FreePages() 351 FreePageRun* fpr = reinterpret_cast<FreePageRun*>(ptr); in FreePages() 503 size_t RosAlloc::FreeInternal(Thread* self, void* ptr) { in FreeInternal() argument 504 DCHECK_LE(base_, ptr); in FreeInternal() [all …]
|
/art/runtime/base/unix_file/ |
D | fd_file.cc | 214 char* ptr = static_cast<char*>(buffer); in ReadFullyGeneric() local 216 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric() 223 ptr += bytes_read; // Move the buffer forward. in ReadFullyGeneric() 242 const char* ptr = static_cast<const char*>(buffer); in WriteFullyGeneric() local 245 ? TEMP_FAILURE_RETRY(pwrite(fd_, ptr, byte_count, offset)) in WriteFullyGeneric() 246 : TEMP_FAILURE_RETRY(write(fd_, ptr, byte_count)); in WriteFullyGeneric() 251 ptr += bytes_written; // Move the buffer forward. in WriteFullyGeneric()
|