Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 117) sorted by relevance

12345

/art/libartbase/base/
Dleb128.h34 const uint8_t* ptr = *data; in DecodeUnsignedLeb128() local
35 int result = *(ptr++); in DecodeUnsignedLeb128()
37 int cur = *(ptr++); in DecodeUnsignedLeb128()
40 cur = *(ptr++); in DecodeUnsignedLeb128()
43 cur = *(ptr++); in DecodeUnsignedLeb128()
48 cur = *(ptr++); in DecodeUnsignedLeb128()
54 *data = ptr; in DecodeUnsignedLeb128()
65 const uint8_t* ptr = *data; in DecodeUnsignedLeb128Checked() local
66 if (ptr >= end) { in DecodeUnsignedLeb128Checked()
69 int result = *(ptr++); in DecodeUnsignedLeb128Checked()
[all …]
Dscoped_arena_allocator.h65 static ArenaFreeTag& ArenaTagForAllocation(void* ptr) { in ArenaTagForAllocation() argument
67 return *(reinterpret_cast<ArenaFreeTag*>(ptr) - 1); in ArenaTagForAllocation()
101 uint8_t* ptr = top_ptr_; in Alloc() local
102 if (UNLIKELY(static_cast<size_t>(top_end_ - ptr) < rounded_bytes)) { in Alloc()
103 ptr = AllocateFromNextArena(rounded_bytes); in Alloc()
106 top_ptr_ = ptr + rounded_bytes; in Alloc()
108 ptr += kAlignment; in Alloc()
109 ArenaTagForAllocation(ptr) = ArenaFreeTag::kUsed; in Alloc()
111 return ptr; in Alloc()
170 static void operator delete(void* ptr ATTRIBUTE_UNUSED) {} in delete()
Darena_allocator.h155 void MakeDefined(void* ptr, size_t size) { in MakeDefined() argument
157 DoMakeDefined(ptr, size); in MakeDefined()
160 void MakeUndefined(void* ptr, size_t size) { in MakeUndefined() argument
162 DoMakeUndefined(ptr, size); in MakeUndefined()
165 void MakeInaccessible(void* ptr, size_t size) { in MakeInaccessible() argument
167 DoMakeInaccessible(ptr, size); in MakeInaccessible()
172 void DoMakeDefined(void* ptr, size_t size);
173 void DoMakeUndefined(void* ptr, size_t size);
174 void DoMakeInaccessible(void* ptr, size_t size);
206 bool Contains(const void* ptr) const { in Contains() argument
[all …]
Dscoped_arena_allocator.cc97 uint8_t* ptr = top_ptr_; in AllocWithMemoryTool() local
98 if (UNLIKELY(static_cast<size_t>(top_end_ - ptr) < rounded_bytes)) { in AllocWithMemoryTool()
99 ptr = AllocateFromNextArena(rounded_bytes); in AllocWithMemoryTool()
100 CHECK(ptr != nullptr) << "Failed to allocate memory"; in AllocWithMemoryTool()
101 MEMORY_TOOL_MAKE_NOACCESS(ptr, top_end_ - ptr); in AllocWithMemoryTool()
104 top_ptr_ = ptr + rounded_bytes; in AllocWithMemoryTool()
105 MEMORY_TOOL_MAKE_UNDEFINED(ptr, bytes); in AllocWithMemoryTool()
106 return ptr; in AllocWithMemoryTool()
Dscoped_flock.h78 void operator()(LockedFile* ptr) { in operator()
79 ptr->ReleaseLock(); in operator()
80 UNUSED(ptr->Close()); in operator()
82 delete ptr; in operator() local
Dscoped_arena_containers.h238 ALWAYS_INLINE void ProtectMemory(T* ptr, size_t size) const { in ProtectMemory() argument
242 memset(ptr, kMagicFill, size); in ProtectMemory()
243 MEMORY_TOOL_MAKE_NOACCESS(ptr, size); in ProtectMemory()
245 CHECK(ArenaStack::ArenaTagForAllocation(reinterpret_cast<void*>(ptr)) == ArenaFreeTag::kUsed) in ProtectMemory()
246 << "Freeing invalid object " << ptr; in ProtectMemory()
247 ArenaStack::ArenaTagForAllocation(reinterpret_cast<void*>(ptr)) = ArenaFreeTag::kFree; in ProtectMemory()
249 memset(ptr, kMagicFill, size); in ProtectMemory()
254 void operator()(T* ptr) const { in operator()
255 if (ptr != nullptr) { in operator()
256 ptr->~T(); in operator()
[all …]
Darena_allocator.cc176 void ArenaAllocatorMemoryTool::DoMakeDefined(void* ptr, size_t size) { in DoMakeDefined() argument
177 MEMORY_TOOL_MAKE_DEFINED(ptr, size); in DoMakeDefined()
180 void ArenaAllocatorMemoryTool::DoMakeUndefined(void* ptr, size_t size) { in DoMakeUndefined() argument
181 MEMORY_TOOL_MAKE_UNDEFINED(ptr, size); in DoMakeUndefined()
184 void ArenaAllocatorMemoryTool::DoMakeInaccessible(void* ptr, size_t size) { in DoMakeInaccessible() argument
185 MEMORY_TOOL_MAKE_NOACCESS(ptr, size); in DoMakeInaccessible()
313 bool ArenaAllocator::Contains(const void* ptr) const { in Contains()
314 if (ptr >= begin_ && ptr < end_) { in Contains()
318 if (cur_arena->Contains(ptr)) { in Contains()
Dhash_set.h259 HashSet(const uint8_t* ptr, bool make_copy_of_data, size_t* read_count) noexcept { in HashSet() argument
262 offset = ReadFromBytes(ptr, offset, &temp); in HashSet()
264 offset = ReadFromBytes(ptr, offset, &temp); in HashSet()
267 offset = ReadFromBytes(ptr, offset, &temp); in HashSet()
269 offset = ReadFromBytes(ptr, offset, &min_load_factor_); in HashSet()
270 offset = ReadFromBytes(ptr, offset, &max_load_factor_); in HashSet()
273 data_ = const_cast<T*>(reinterpret_cast<const T*>(ptr + offset)); in HashSet()
280 offset = ReadFromBytes(ptr, offset, &data_[i]); in HashSet()
289 size_t WriteToMemory(uint8_t* ptr) const { in WriteToMemory() argument
291 offset = WriteToBytes(ptr, offset, static_cast<uint64_t>(num_elements_)); in WriteToMemory()
[all …]
/art/runtime/mirror/
Dobject_reference-inl.h28 inline uint32_t PtrCompression<kPoisonReferences, MirrorType>::Compress(ObjPtr<MirrorType> ptr) { in Compress() argument
29 return Compress(ptr.Ptr()); in Compress()
34 void ObjectReference<kPoisonReferences, MirrorType>::Assign(ObjPtr<MirrorType> ptr) { in Assign() argument
35 Assign(ptr.Ptr()); in Assign()
48 void HeapReference<MirrorType>::Assign(ObjPtr<MirrorType> ptr) { in Assign() argument
49 Assign<kIsVolatile>(ptr.Ptr()); in Assign()
/art/runtime/
Dobj_ptr-inl.h54 inline uintptr_t ObjPtr<MirrorType>::Encode(MirrorType* ptr) { in Encode() argument
55 uintptr_t ref = reinterpret_cast<uintptr_t>(ptr); in Encode()
69 inline ObjPtr<MirrorType>::ObjPtr(Type* ptr) in ObjPtr() argument
70 : reference_(Encode(static_cast<MirrorType*>(ptr))) { in ObjPtr()
95 OBJPTR_INLINE ObjPtr<MirrorType>& ObjPtr<MirrorType>::operator=(MirrorType* ptr) {
96 Assign(ptr);
101 inline void ObjPtr<MirrorType>::Assign(MirrorType* ptr) { in Assign() argument
102 reference_ = Encode(ptr); in Assign()
118 inline ObjPtr<MirrorType> ObjPtr<MirrorType>::DownCast(ObjPtr<SourceType> ptr) { in DownCast() argument
121 return static_cast<MirrorType*>(ptr.Ptr()); in DownCast()
[all …]
Dlinear_alloc.cc26 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()
51 bool LinearAlloc::Contains(void* ptr) const { in Contains()
53 return allocator_.Contains(ptr); in Contains()
56 bool LinearAlloc::ContainsUnsafe(void* ptr) const { in ContainsUnsafe()
57 return allocator_.Contains(ptr); in ContainsUnsafe()
Dobj_ptr.h63 OBJPTR_INLINE ObjPtr(Type* ptr) REQUIRES_SHARED(Locks::mutator_lock_);
73 OBJPTR_INLINE ObjPtr& operator=(MirrorType* ptr) REQUIRES_SHARED(Locks::mutator_lock_);
75 OBJPTR_INLINE void Assign(MirrorType* ptr) REQUIRES_SHARED(Locks::mutator_lock_);
102 static ObjPtr<MirrorType> DownCast(ObjPtr<SourceType> ptr) REQUIRES_SHARED(Locks::mutator_lock_);
106 static ObjPtr<MirrorType> DownCast(SourceType* ptr) REQUIRES_SHARED(Locks::mutator_lock_);
116 OBJPTR_INLINE static uintptr_t Encode(MirrorType* ptr) REQUIRES_SHARED(Locks::mutator_lock_);
130 size_t operator()(const ObjPtr<MirrorType>& ptr) const NO_THREAD_SAFETY_ANALYSIS;
152 OBJPTR_INLINE bool operator==(ObjPtr<MirrorType> ptr, std::nullptr_t) {
153 return ptr.IsNull();
157 OBJPTR_INLINE bool operator==(std::nullptr_t, ObjPtr<MirrorType> ptr) {
[all …]
Dimtable.h47 uint8_t* ptr = AddressOfElement(index, pointer_size); in Get() local
49 uint32_t value = *reinterpret_cast<uint32_t*>(ptr); in Get()
52 uint64_t value = *reinterpret_cast<uint64_t*>(ptr); in Get()
59 uint8_t* ptr = AddressOfElement(index, pointer_size); in Set() local
61 *reinterpret_cast<uint32_t*>(ptr) = reinterpret_cast32<uint32_t>(method); in Set()
63 *reinterpret_cast<uint64_t*>(ptr) = reinterpret_cast64<uint64_t>(method); in Set()
Doat.cc310 const char* ptr = reinterpret_cast<const char*>(&key_value_store_); in GetStoreValueByKey() local
311 const char* end = ptr + key_value_store_size_; in GetStoreValueByKey()
313 while (ptr < end) { in GetStoreValueByKey()
315 const char* str_end = ParseString(ptr, end); in GetStoreValueByKey()
317 if (strcmp(key, ptr) == 0) { in GetStoreValueByKey()
324 ptr = ParseString(str_end + 1, end) + 1; in GetStoreValueByKey()
336 const char* ptr = reinterpret_cast<const char*>(&key_value_store_); in GetStoreKeyValuePairByIndex() local
337 const char* end = ptr + key_value_store_size_; in GetStoreKeyValuePairByIndex()
340 while (ptr < end && counter >= 0) { in GetStoreKeyValuePairByIndex()
342 const char* str_end = ParseString(ptr, end); in GetStoreKeyValuePairByIndex()
[all …]
Dlinear_alloc.h36 void* Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) REQUIRES(!lock_);
50 bool Contains(void* ptr) const REQUIRES(!lock_);
54 bool ContainsUnsafe(void* ptr) const NO_THREAD_SAFETY_ANALYSIS;
/art/libdexfile/dex/
Dutf_test.cc63 const char* ptr = start; in TEST_F() local
67 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
70 EXPECT_ARRAY_POSITION(1, ptr, start); in TEST_F()
73 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
76 EXPECT_ARRAY_POSITION(3, ptr, start); in TEST_F()
79 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
82 EXPECT_ARRAY_POSITION(6, ptr, start); in TEST_F()
85 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
88 EXPECT_ARRAY_POSITION(10, ptr, start); in TEST_F()
91 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
[all …]
/art/test/616-cha-unloading/
Dcha_unload.cc36 explicit FindPointerAllocatorVisitor(void* ptr) : is_found(false), ptr_(ptr) {} in FindPointerAllocatorVisitor() argument
61 void* ptr = reinterpret_cast64<void*>(art_method); in Java_Main_reuseArenaOfMethod() local
66 if (Runtime::Current()->GetLinearAlloc()->Contains(ptr)) { in Java_Main_reuseArenaOfMethod()
71 FindPointerAllocatorVisitor visitor(ptr); in Java_Main_reuseArenaOfMethod()
84 } while (!alloc->Contains(ptr)); in Java_Main_reuseArenaOfMethod()
/art/compiler/jit/
Djit_logger.h98 void WriteLog(const void* ptr, size_t code_size, ArtMethod* method) in WriteLog() argument
100 WritePerfMapLog(ptr, code_size, method); in WriteLog()
101 WriteJitDumpLog(ptr, code_size, method); in WriteLog()
112 void WritePerfMapLog(const void* ptr, size_t code_size, ArtMethod* method)
118 void WriteJitDumpLog(const void* ptr, size_t code_size, ArtMethod* method)
/art/compiler/utils/
Dswap_space.cc75 if (munmap(chunk.ptr, chunk.size) != 0) { in ~SwapSpace()
77 << static_cast<const void*>(chunk.ptr) << " size=" << chunk.size; in ~SwapSpace()
127 it->free_by_start_entry->ptr += size; in Alloc()
134 return old_chunk.ptr; in Alloc()
140 SpaceChunk remainder = { new_chunk.ptr + size, new_chunk.size - size }; in Alloc()
143 return new_chunk.ptr; in Alloc()
154 uint8_t* ptr = reinterpret_cast<uint8_t*>( in NewFileChunk() local
156 if (ptr == MAP_FAILED) { in NewFileChunk()
165 SpaceChunk new_chunk = {ptr, next_part}; in NewFileChunk()
175 void SwapSpace::Free(void* ptr, size_t size) { in Free() argument
[all …]
Dswap_space.h40 void Free(void* ptr, size_t size) REQUIRES(!lock_);
51 mutable uint8_t* ptr; member
55 return reinterpret_cast<uintptr_t>(ptr); in Start()
58 return reinterpret_cast<uintptr_t>(ptr) + size; in End()
65 return reinterpret_cast<uintptr_t>(a.ptr) < reinterpret_cast<uintptr_t>(b.ptr); in operator()
/art/test/ti-agent/
Dscoped_local_ref.h38 void reset(T ptr = nullptr) {
39 if (ptr != mLocalRef) {
43 mLocalRef = ptr;
/art/libelffile/dwarf/
Dwriter.h119 void PushData(const uint8_t* ptr, size_t num_bytes) { in PushData() argument
120 data_->insert(data_->end(), ptr, ptr + num_bytes); in PushData()
123 void PushData(const char* ptr, size_t num_bytes) { in PushData() argument
124 data_->insert(data_->end(), ptr, ptr + num_bytes); in PushData()
/art/runtime/arch/arm/
Dfault_handler_arm.cc77 uint8_t* ptr = reinterpret_cast<uint8_t*>(sc->arm_pc); in GetMethodAndReturnPcAndSp() local
78 VLOG(signals) << "pc: " << std::hex << static_cast<void*>(ptr); in GetMethodAndReturnPcAndSp()
80 if (ptr == nullptr) { in GetMethodAndReturnPcAndSp()
86 uint32_t instr_size = GetInstructionSize(ptr); in GetMethodAndReturnPcAndSp()
104 uint8_t* ptr = reinterpret_cast<uint8_t*>(sc->arm_pc); in Action() local
105 uint32_t instr_size = GetInstructionSize(ptr); in Action()
/art/test/1909-per-agent-tls/src/art/
DTest1909.java36 public void setTLS(long jvmtienv, long ptr) { in setTLS() argument
37 Test1909.setTLS(jvmtienv, this.thr, ptr); in setTLS()
75 public void setTLS(long jvmtienv, long ptr) { in setTLS() argument
76 Test1909.setTLS(jvmtienv, this.thr, ptr); in setTLS()
173 public static native void setTLS(long jvmtienv, Thread thr, long ptr); in setTLS() argument
/art/runtime/gc/space/
Ddlmalloc_space.cc226 size_t DlMallocSpace::Free(Thread* self, mirror::Object* ptr) { in Free() argument
229 CHECK(ptr != nullptr); in Free()
230 CHECK(Contains(ptr)) << "Free (" << ptr << ") not in bounds of heap " << *this; in Free()
232 const size_t bytes_freed = AllocationSizeNonvirtual(ptr, nullptr); in Free()
234 RegisterRecentFree(ptr); in Free()
236 mspace_free(mspace_, ptr); in Free()
246 mirror::Object* ptr = ptrs[i]; in FreeList() local
252 bytes_freed += AllocationSizeNonvirtual(ptr, nullptr); in FreeList()

12345