yiguolei commented on code in PR #69819: URL: https://github.com/apache/doris/pull/69819#discussion_r4410242180
########## be/src/runtime/memory/jemalloc_hook.cpp: ########## @@ -77,6 +77,12 @@ void* realloc(void* p, size_t size) __THROW ALIAS(doris_realloc); void* calloc(size_t n, size_t size) __THROW ALIAS(doris_calloc); void cfree(void* ptr) __THROW ALIAS(doris_cfree); void* memalign(size_t align, size_t size) __THROW ALIAS(doris_memalign); +#ifdef __GLIBC__ +// Before glibc 2.25, dlopened modules allocate dynamic TLS with __libc_memalign +// and release it through free. Route both to jemalloc so thread exit does not +// pass a glibc allocation to doris_free. +void* __libc_memalign(size_t align, size_t size) __THROW ALIAS(doris_memalign); +#endif Review Comment: does jemalloc hook still useful? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
