Ticket #45092: memalign.diff

File memalign.diff, 798 bytes (added by c9s (Yo-An Lin), 10 years ago)

Patch file

  • src/jemalloc.c

    je_valloc(size_t size) 
    13121312#define        is_malloc_(a) malloc_is_ ## a
    13131313#define        is_malloc(a) is_malloc_(a)
    13141314
    1315 #if ((is_malloc(je_malloc) == 1) && defined(__GLIBC__) && !defined(__UCLIBC__))
    13161315/*
    13171316 * glibc provides the RTLD_DEEPBIND flag for dlopen which can make it possible
    13181317 * to inconsistently reference libc's malloc(3)-compatible functions
    je_valloc(size_t size) 
    13251324JEMALLOC_EXPORT void (* __free_hook)(void *ptr) = je_free;
    13261325JEMALLOC_EXPORT void *(* __malloc_hook)(size_t size) = je_malloc;
    13271326JEMALLOC_EXPORT void *(* __realloc_hook)(void *ptr, size_t size) = je_realloc;
     1327#ifdef JEMALLOC_OVERRIDE_MEMALIGN
    13281328JEMALLOC_EXPORT void *(* __memalign_hook)(size_t alignment, size_t size) =
    13291329    je_memalign;
    13301330#endif