This source file includes following definitions.
- new
- ReplaceSystemAlloc
#ifndef TCMALLOC_LIBC_OVERRIDE_GCC_AND_WEAK_INL_H_
#define TCMALLOC_LIBC_OVERRIDE_GCC_AND_WEAK_INL_H_
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <gperftools/tcmalloc.h>
#ifndef __THROW
# define __THROW
#endif
#ifndef __GNUC__
# error libc_override_gcc_and_weak.h is for gcc distributions only.
#endif
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
#if defined(__ANDROID__)
#define STD_BAD_ALLOC
#else
#define STD_BAD_ALLOC std::bad_alloc
#endif
void* operator new(size_t size) throw (STD_BAD_ALLOC)
ALIAS(tc_new);
void operator delete(void* p) __THROW
ALIAS(tc_delete);
void* operator new[](size_t size) throw (STD_BAD_ALLOC)
ALIAS(tc_newarray);
void operator delete[](void* p) __THROW
ALIAS(tc_deletearray);
void* operator new(size_t size, const std::nothrow_t& nt) __THROW
ALIAS(tc_new_nothrow);
void* operator new[](size_t size, const std::nothrow_t& nt) __THROW
ALIAS(tc_newarray_nothrow);
void operator delete(void* p, const std::nothrow_t& nt) __THROW
ALIAS(tc_delete_nothrow);
void operator delete[](void* p, const std::nothrow_t& nt) __THROW
ALIAS(tc_deletearray_nothrow);
extern "C" {
void* malloc(size_t size) __THROW ALIAS(tc_malloc);
void free(void* ptr) __THROW ALIAS(tc_free);
void* realloc(void* ptr, size_t size) __THROW ALIAS(tc_realloc);
void* calloc(size_t n, size_t size) __THROW ALIAS(tc_calloc);
void cfree(void* ptr) __THROW ALIAS(tc_cfree);
void* memalign(size_t align, size_t s) __THROW ALIAS(tc_memalign);
void* valloc(size_t size) __THROW ALIAS(tc_valloc);
void* pvalloc(size_t size) __THROW ALIAS(tc_pvalloc);
int posix_memalign(void** r, size_t a, size_t s) __THROW
ALIAS(tc_posix_memalign);
void malloc_stats(void) __THROW ALIAS(tc_malloc_stats);
int mallopt(int cmd, int value) __THROW ALIAS(tc_mallopt);
#ifdef HAVE_STRUCT_MALLINFO
struct mallinfo mallinfo(void) __THROW ALIAS(tc_mallinfo);
#endif
size_t malloc_size(void* p) __THROW ALIAS(tc_malloc_size);
size_t malloc_usable_size(void* p) __THROW ALIAS(tc_malloc_size);
}
#undef ALIAS
static void ReplaceSystemAlloc() { }
#endif