#ifndef SCUDO_PREFIX
#error "Define SCUDO_PREFIX prior to including this file!"
#endif
#ifndef SCUDO_MALLOC_ALIGNMENT
#define SCUDO_MALLOC_ALIGNMENT …
#endif
static void reportAllocation(void *ptr, size_t size) { … }
static void reportDeallocation(void *ptr) { … }
static void reportReallocAllocation(void *old_ptr, void *new_ptr, size_t size) { … }
static void reportReallocDeallocation(void *old_ptr) { … }
extern "C" {
INTERFACE WEAK void *SCUDO_PREFIX(calloc)(size_t nmemb, size_t size) { … }
INTERFACE WEAK void SCUDO_PREFIX(free)(void *ptr) { … }
INTERFACE WEAK struct SCUDO_MALLINFO SCUDO_PREFIX(mallinfo)(void) { … }
#if !SCUDO_ANDROID
INTERFACE WEAK struct __scudo_mallinfo2 SCUDO_PREFIX(mallinfo2)(void) { … }
#endif
INTERFACE WEAK void *SCUDO_PREFIX(malloc)(size_t size) { … }
#if SCUDO_ANDROID
INTERFACE WEAK size_t SCUDO_PREFIX(malloc_usable_size)(const void *ptr) {
#else
INTERFACE WEAK size_t SCUDO_PREFIX(malloc_usable_size)(void *ptr) { … }
INTERFACE WEAK void *SCUDO_PREFIX(memalign)(size_t alignment, size_t size) { … }
INTERFACE WEAK int SCUDO_PREFIX(posix_memalign)(void **memptr, size_t alignment,
size_t size) { … }
INTERFACE WEAK void *SCUDO_PREFIX(pvalloc)(size_t size) { … }
INTERFACE WEAK void *SCUDO_PREFIX(realloc)(void *ptr, size_t size) { … }
INTERFACE WEAK void *SCUDO_PREFIX(valloc)(size_t size) { … }
INTERFACE WEAK int SCUDO_PREFIX(malloc_iterate)(
uintptr_t base, size_t size,
void (*callback)(uintptr_t base, size_t size, void *arg), void *arg) { … }
INTERFACE WEAK void SCUDO_PREFIX(malloc_enable)() { … }
INTERFACE WEAK void SCUDO_PREFIX(malloc_disable)() { … }
void SCUDO_PREFIX(malloc_postinit)() { … }
INTERFACE WEAK int SCUDO_PREFIX(mallopt)(int param, int value) { … }
INTERFACE WEAK void *SCUDO_PREFIX(aligned_alloc)(size_t alignment,
size_t size) { … }
INTERFACE WEAK int SCUDO_PREFIX(malloc_info)(UNUSED int options, FILE *stream) { … }
INTERFACE WEAK void SCUDO_PREFIX(malloc_disable_memory_tagging)() { … }
INTERFACE WEAK void
SCUDO_PREFIX(malloc_set_track_allocation_stacks)(int track) { … }
INTERFACE WEAK void SCUDO_PREFIX(malloc_set_zero_contents)(int zero_contents) { … }
INTERFACE WEAK void
SCUDO_PREFIX(malloc_set_pattern_fill_contents)(int pattern_fill_contents) { … }
INTERFACE WEAK void
SCUDO_PREFIX(malloc_set_add_large_allocation_slack)(int add_slack) { … }
}