Home
last modified time | relevance | path

Searched refs:pointer (Results 1 – 25 of 31) sorted by relevance

12

/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp208 uint8_t* pointer = reinterpret_cast<uint8_t*>(debug_malloc(alloc_size)); in VerifyAllocCalls() local
209 ASSERT_TRUE(pointer != nullptr); in VerifyAllocCalls()
210 for (size_t i = 0; i < debug_malloc_usable_size(pointer); i++) { in VerifyAllocCalls()
211 ASSERT_EQ(0xeb, pointer[i]); in VerifyAllocCalls()
213 debug_free(pointer); in VerifyAllocCalls()
216 pointer = reinterpret_cast<uint8_t*>(debug_calloc(1, alloc_size)); in VerifyAllocCalls()
217 ASSERT_TRUE(pointer != nullptr); in VerifyAllocCalls()
218 for (size_t i = 0; i < debug_malloc_usable_size(pointer); i++) { in VerifyAllocCalls()
219 ASSERT_EQ(0, pointer[i]) << "Failed at byte " << i; in VerifyAllocCalls()
221 debug_free(pointer); in VerifyAllocCalls()
[all …]
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp182 ssize_t debug_malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count);
184 size_t debug_malloc_usable_size(void* pointer);
186 void debug_free(void* pointer);
189 void* debug_realloc(void* pointer, size_t bytes);
310 static void LogError(const void* pointer, const char* error_str) { in LogError() argument
312 error_log("+++ ALLOCATION %p %s", pointer, error_str); in LogError()
317 PointerData::LogFreeBacktrace(pointer); in LogError()
328 static bool VerifyPointer(const void* pointer, const char* function_name) { in VerifyPointer() argument
330 Header* header = g_debug->GetHeader(pointer); in VerifyPointer()
339 LogError(pointer, error_str.c_str()); in VerifyPointer()
[all …]
DDebugData.cpp63 pointer.reset(new PointerData(this)); in Initialize()
64 if (!pointer->Initialize(config_)) { in Initialize()
90 if (pointer != nullptr) { in PrepareFork()
91 pointer->PrepareFork(); in PrepareFork()
96 if (pointer != nullptr) { in PostForkParent()
97 pointer->PostForkParent(); in PostForkParent()
102 if (pointer != nullptr) { in PostForkChild()
103 pointer->PostForkChild(); in PostForkChild()
DRecordData.cpp56 AllocEntry::AllocEntry(void* pointer, uint64_t start_ns, uint64_t end_ns) in AllocEntry() argument
57 : pointer_(pointer), start_ns_(start_ns), end_ns_(end_ns) {} in AllocEntry()
59 MallocEntry::MallocEntry(void* pointer, size_t size, uint64_t start_ns, uint64_t end_ns) in MallocEntry() argument
60 : AllocEntry(pointer, start_ns, end_ns), size_(size) {} in MallocEntry()
67 FreeEntry::FreeEntry(void* pointer, uint64_t start_ns, uint64_t end_ns) in FreeEntry() argument
68 : AllocEntry(pointer, start_ns, end_ns) {} in FreeEntry()
75 CallocEntry::CallocEntry(void* pointer, size_t nmemb, size_t size, uint64_t start_ns, in CallocEntry() argument
77 : MallocEntry(pointer, size, start_ns, end_ns), nmemb_(nmemb) {} in CallocEntry()
84 ReallocEntry::ReallocEntry(void* pointer, size_t size, void* old_pointer, uint64_t start_ns, in ReallocEntry() argument
86 : MallocEntry(pointer, size, start_ns, end_ns), old_pointer_(old_pointer) {} in ReallocEntry()
[all …]
DPointerData.h108 uintptr_t pointer;
138 static void IteratePointers(std::function<void(uintptr_t pointer)> fn);
143 static void Add(const void* pointer, size_t size);
144 static void Remove(const void* pointer);
146 static void* AddFreed(const void* pointer, size_t size_bytes);
159 static size_t GetFrames(const void* pointer, uintptr_t* frames, size_t max_frames);
161 static bool Exists(const void* pointer);
167 static inline uintptr_t ManglePointer(uintptr_t pointer) { return pointer ^ UINTPTR_MAX; }
168 static inline uintptr_t DemanglePointer(uintptr_t pointer) { return pointer ^ UINTPTR_MAX; }
DRecordData.h71 explicit AllocEntry(void* pointer, uint64_t st, uint64_t et);
87 MallocEntry(void* pointer, size_t size, uint64_t st, uint64_t et);
101 explicit FreeEntry(void* pointer, uint64_t st, uint64_t et);
112 CallocEntry(void* pointer, size_t nmemb, size_t size, uint64_t st, uint64_t et);
126 ReallocEntry(void* pointer, size_t size, void* old_pointer, uint64_t st, uint64_t et);
141 MemalignEntry(void* pointer, size_t size, size_t alignment, uint64_t st, uint64_t et);
DPointerData.cpp83 g_debug->pointer->ToggleBacktraceEnabled(); in ToggleBacktraceEnable()
87 g_debug->pointer->EnableDumping(); in EnableDump()
293 uintptr_t pointer = DemanglePointer(info.mangled_ptr); in LogFreeError() local
294 uint8_t* memory = reinterpret_cast<uint8_t*>(pointer); in LogFreeError()
316 uintptr_t pointer = DemanglePointer(info.mangled_ptr); in VerifyFreedPointer() local
319 Header* header = g_debug->GetHeader(reinterpret_cast<const void*>(pointer)); in VerifyFreedPointer()
322 error_log("+++ ALLOCATION 0x%" PRIxPTR " HAS CORRUPTED HEADER TAG 0x%x AFTER FREE", pointer, in VerifyFreedPointer()
335 usable_size = g_dispatch->malloc_usable_size(reinterpret_cast<const void*>(pointer)); in VerifyFreedPointer()
342 const uint8_t* memory = reinterpret_cast<const uint8_t*>(pointer); in VerifyFreedPointer()
378 uintptr_t pointer = reinterpret_cast<uintptr_t>(ptr); in LogFreeBacktrace() local
[all …]
DDebugData.h58 Header* GetHeader(const void* pointer) { in GetHeader() argument
59 uintptr_t value = reinterpret_cast<uintptr_t>(pointer); in GetHeader()
86 std::unique_ptr<PointerData> pointer; variable
DGuardData.cpp49 void GuardData::LogFailure(const Header* header, const void* pointer, const void* data) { in LogFailure() argument
51 error_log("+++ ALLOCATION %p SIZE %zu HAS A CORRUPTED %s GUARD", pointer, header->size, in LogFailure()
56 int pointer_idx = reinterpret_cast<uintptr_t>(data) - reinterpret_cast<uintptr_t>(pointer); in LogFailure()
DREADME.md35 call changes the backtrace for the pointer no matter whether the pointer
267 When a pointer is freed, do not free the memory right away, but add it to
386 pointer = malloc(size)
388 **THREAD\_ID**: malloc pointer size
394 free(pointer)
396 **THREAD\_ID**: free pointer
402 pointer = calloc(nmemb, size)
404 **THREAD\_ID**: calloc pointer nmemb size
418 pointer = memalign(alignment, size)
420 **THREAD\_ID**: memalign pointer alignment size
[all …]
DGuardData.h52 void LogFailure(const Header* header, const void* pointer, const void* data);
DREADME_marshmallow_and_earlier.md87 When a pointer is freed, do not free the memory right away, but add it to
/bionic/libc/malloc_debug/tools/
Dgen_malloc.pl183 my ($opts, $cur_thread, $pointer, $name, $size, $arg2) = @_;
187 $opts->{pointers}->{$pointer} = $slot;
190 $opts->{pointers}->{$pointer} = -1;
211 my $pointer = $1;
213 PrintAlloc($opts, $cur_thread, $pointer, "MALLOC", $size, 0);
215 my $pointer = $1;
218 PrintAlloc($opts, $cur_thread, $pointer, "CALLOC", $size, $nmemb);
220 my $pointer = $1;
223 PrintAlloc($opts, $cur_thread, $pointer, "MEMALIGN", $size, $align);
225 my $pointer = $1;
[all …]
/bionic/libc/malloc_hooks/
Dmalloc_hooks.cpp57 ssize_t hooks_malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count);
59 size_t hooks_malloc_usable_size(void* pointer);
62 void hooks_free(void* pointer);
65 void* hooks_realloc(void* pointer, size_t bytes);
85 static void* default_realloc_hook(void* pointer, size_t bytes, const void*) { in default_realloc_hook() argument
86 return g_dispatch->realloc(pointer, bytes); in default_realloc_hook()
89 static void default_free_hook(void* pointer, const void*) { in default_free_hook() argument
90 g_dispatch->free(pointer); in default_free_hook()
124 size_t hooks_malloc_usable_size(void* pointer) { in hooks_malloc_usable_size() argument
125 return g_dispatch->malloc_usable_size(pointer); in hooks_malloc_usable_size()
[all …]
/bionic/libc/kernel/uapi/linux/
Dvbox_vmmdev_types.h142 } pointer; member
160 } __attribute__((__packed__)) pointer; member
Dwireless.h255 void * pointer; member
/bionic/tools/versioner/src/
DAndroid.bp33 "-fno-omit-frame-pointer",
/bionic/docs/
Dfdtrack.md61 * Unable to unwind through ART because it doesn't maintain the frame pointer
62 * Requires -fno-omit-frame-pointer to be used on all code being unwound
66 * Chasing the frame pointer will often result in multiple frames inside the
Delf-tls.md24 architecture-specific thread pointer (TP) and can be accessed very efficiently -- typically just a
31 architecture-specific thread-pointer ([`__get_tls()`] in Bionic):
44 Each thread has a "Dynamic Thread Vector" (DTV) with a pointer to each module's TLS block (or NULL
47 expected to point immediately at the DTV pointer, whereas in variant 2, the DTV pointer's offset
176 // TPOFF is directly relative to the thread pointer.
379 thread pointer (e.g. `ps_get_thread_area`).
391 pointer was removed in [D10661] ([this function][r240543]). (arm32 was apparently never supported.)
416 `_thread_db_pthread_dtvp` | Offset from TP to DTV pointer (0 for variant 1, implementation-…
418 `_thread_db_dtv_t_pointer_val` | Offset within a DTV slot to the pointer to the allocated TLS bl…
427 * Read the target thread pointer.
[all …]
DEINTR.md34 null pointer checks.)
/bionic/linker/
Dlinker_block_allocator_test.cpp43 void* pointer; member
/bionic/libc/bionic/
Dmalloc_common_dynamic.cpp465 extern "C" ssize_t malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count) { in malloc_backtrace() argument
470 return reinterpret_cast<malloc_backtrace_func_t>(func)(pointer, frames, frame_count); in malloc_backtrace()
/bionic/tests/
Dthread_local_test.cpp167 typedef unsigned int gcc_pointer __attribute__((mode(pointer)));
Dmalloc_test.cpp541 void* pointer = malloc(size); in TEST() local
542 ASSERT_TRUE(pointer != nullptr); in TEST()
543 memset(pointer, 0xeb, malloc_usable_size(pointer)); in TEST()
544 free(pointer); in TEST()
549 ASSERT_TRUE(pointer != nullptr); in TEST()
/bionic/libc/kernel/uapi/drm/
Dpvr_drm.h105 __u64 pointer; member

12