Home
last modified time | relevance | path

Searched refs:old_mem (Results 1 – 3 of 3) sorted by relevance

/bionic/libc/bionic/
Dgwp_asan_wrappers.cpp146 void* gwp_asan_realloc(void* old_mem, size_t bytes) { in gwp_asan_realloc() argument
147 if (__predict_false(GuardedAlloc.pointerIsMine(old_mem))) { in gwp_asan_realloc()
148 size_t old_size = GuardedAlloc.getSize(old_mem); in gwp_asan_realloc()
150 if (new_ptr) memcpy(new_ptr, old_mem, (bytes < old_size) ? bytes : old_size); in gwp_asan_realloc()
151 GuardedAlloc.deallocate(old_mem); in gwp_asan_realloc()
154 return prev_dispatch->realloc(old_mem, bytes); in gwp_asan_realloc()
Dmalloc_common.cpp183 extern "C" __attribute__((__noinline__)) void* realloc(void* old_mem, size_t bytes) { in realloc() argument
185 old_mem = MaybeUntagAndCheckPointer(old_mem); in realloc()
187 return MaybeTagPointer(dispatch_table->realloc(old_mem, bytes)); in realloc()
189 void* result = Malloc(realloc)(old_mem, bytes); in realloc()
191 warning_log("realloc(%p, %zu) failed: returning null pointer", old_mem, bytes); in realloc()
196 extern "C" void* reallocarray(void* old_mem, size_t item_count, size_t item_size) { in reallocarray() argument
200 old_mem, item_count, item_size); in reallocarray()
204 return realloc(old_mem, new_size); in reallocarray()
Dmalloc_limit.cpp52 static void* LimitRealloc(void* old_mem, size_t bytes);
195 static void* LimitRealloc(void* old_mem, size_t bytes) { in LimitRealloc() argument
196 size_t old_usable_size = LimitUsableSize(old_mem); in LimitRealloc()
200 warning_log("malloc_limit: realloc(%p, %zu) exceeds limit %" PRId64, old_mem, bytes, in LimitRealloc()
203 LimitFree(old_mem); in LimitRealloc()
209 new_ptr = dispatch_table->realloc(old_mem, bytes); in LimitRealloc()
211 new_ptr = Malloc(realloc)(old_mem, bytes); in LimitRealloc()