Home
last modified time | relevance | path

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

/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp139 uint8_t* pointer = reinterpret_cast<uint8_t*>(debug_malloc(alloc_size)); in VerifyAllocCalls() local
140 ASSERT_TRUE(pointer != nullptr); in VerifyAllocCalls()
141 for (size_t i = 0; i < debug_malloc_usable_size(pointer); i++) { in VerifyAllocCalls()
142 ASSERT_EQ(0xeb, pointer[i]); in VerifyAllocCalls()
144 debug_free(pointer); in VerifyAllocCalls()
147 pointer = reinterpret_cast<uint8_t*>(debug_calloc(1, alloc_size)); in VerifyAllocCalls()
148 ASSERT_TRUE(pointer != nullptr); in VerifyAllocCalls()
149 for (size_t i = 0; i < debug_malloc_usable_size(pointer); i++) { in VerifyAllocCalls()
150 ASSERT_EQ(0, pointer[i]) << "Failed at byte " << i; in VerifyAllocCalls()
152 debug_free(pointer); in VerifyAllocCalls()
[all …]
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp71 ssize_t debug_malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count);
73 size_t debug_malloc_usable_size(void* pointer);
75 void debug_free(void* pointer);
77 void* debug_realloc(void* pointer, size_t bytes);
118 static void LogTagError(const Header* header, const void* pointer, const char* name) { in LogTagError() argument
121 error_log("+++ ALLOCATION %p USED AFTER FREE (%s)", pointer, name); in LogTagError()
126 error_log("+++ ALLOCATION %p HAS INVALID TAG %" PRIx32 " (%s)", pointer, header->tag, name); in LogTagError()
267 static size_t internal_malloc_usable_size(void* pointer) { in internal_malloc_usable_size() argument
269 Header* header = g_debug->GetHeader(pointer); in internal_malloc_usable_size()
271 LogTagError(header, pointer, "malloc_usable_size"); in internal_malloc_usable_size()
[all …]
DRecordData.cpp55 AllocEntry::AllocEntry(void* pointer) : pointer_(pointer) { in AllocEntry() argument
58 MallocEntry::MallocEntry(void* pointer, size_t size) : AllocEntry(pointer), size_(size) { in MallocEntry() argument
65 FreeEntry::FreeEntry(void* pointer) : AllocEntry(pointer) { in FreeEntry() argument
72 CallocEntry::CallocEntry(void* pointer, size_t nmemb, size_t size) in CallocEntry() argument
73 : MallocEntry(pointer, size), nmemb_(nmemb) { in CallocEntry()
80 ReallocEntry::ReallocEntry(void* pointer, size_t size, void* old_pointer) in ReallocEntry() argument
81 : MallocEntry(pointer, size), old_pointer_(old_pointer) { in ReallocEntry()
90 MemalignEntry::MemalignEntry(void* pointer, size_t size, size_t alignment) in MemalignEntry() argument
91 : MallocEntry(pointer, size), alignment_(alignment) { in MemalignEntry()
DFreeTrackData.cpp45 void FreeTrackData::LogFreeError(const Header* header, const uint8_t* pointer) { in LogFreeError() argument
47 error_log("+++ ALLOCATION %p USED AFTER FREE", pointer); in LogFreeError()
50 if (pointer[i] != fill_free_value) { in LogFreeError()
51 error_log(" allocation[%zu] = 0x%02x (expected 0x%02x)", i, pointer[i], fill_free_value); in LogFreeError()
64 const void* pointer = debug_->GetPointer(header); in VerifyAndFree() local
67 error_log("+++ ALLOCATION %p HAS CORRUPTED HEADER TAG 0x%x AFTER FREE", pointer, header->tag); in VerifyAndFree()
70 const uint8_t* memory = reinterpret_cast<const uint8_t*>(pointer); in VerifyAndFree()
77 LogFreeError(header, reinterpret_cast<const uint8_t*>(pointer)); in VerifyAndFree()
DRecordData.h69 AllocEntry(void* pointer);
81 MallocEntry(void* pointer, size_t size);
95 FreeEntry(void* pointer);
106 CallocEntry(void* pointer, size_t size, size_t nmemb);
120 ReallocEntry(void* pointer, size_t size, void* old_pointer);
135 MemalignEntry(void* pointer, size_t size, size_t alignment);
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, in LogFailure()
56 int pointer_idx = reinterpret_cast<uintptr_t>(data) - reinterpret_cast<uintptr_t>(pointer); in LogFailure()
DDebugData.h61 Header* GetHeader(const void* pointer) { in GetHeader() argument
62 uintptr_t value = reinterpret_cast<uintptr_t>(pointer); in GetHeader()
DFreeTrackData.h61 void LogFreeError(const Header* header, const uint8_t* pointer);
DREADME.md153 When a pointer is freed, do not free the memory right away, but add it to
260 pointer = malloc(size)
262 **THREAD\_ID**: malloc pointer size
268 free(pointer)
270 **THREAD\_ID**: free pointer
276 pointer = calloc(nmemb, size)
278 **THREAD\_ID**: calloc pointer nmemb size
292 pointer = memalign(alignment, size)
294 **THREAD\_ID**: memalign pointer alignment size
296 posix\_memalign(&pointer, alignment, size)
[all …]
DGuardData.h53 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/tests/
Dmalloc_test.cpp368 void* pointer = malloc(size); in TEST() local
369 ASSERT_TRUE(pointer != nullptr); in TEST()
370 memset(pointer, 0xeb, malloc_usable_size(pointer)); in TEST()
371 free(pointer); in TEST()
376 ASSERT_TRUE(pointer != nullptr); in TEST()
Dthread_local_test.cpp175 typedef unsigned int gcc_pointer __attribute__((mode(pointer)));
/bionic/linker/
Dlinker_allocator.h82 typedef T* pointer; typedef
/bionic/linker/tests/
Dlinker_block_allocator_test.cpp42 void* pointer; member
/bionic/libc/bionic/
Dmalloc_common.cpp467 extern "C" ssize_t malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count) { in malloc_backtrace() argument
471 return g_debug_malloc_backtrace_func(pointer, frames, frame_count); in malloc_backtrace()
/bionic/libc/kernel/uapi/linux/
Dwireless.h266 void __user * pointer; member
/bionic/libc/
DAndroid.bp47 "-Werror=pointer-to-int-cast",
48 "-Werror=int-to-pointer-cast",