mirror of
https://git.freebsd.org/ports.git
synced 2025-05-16 01:01:49 -04:00
google-perftools port puts libtcmalloc_minimal.so inside /usr/local/lib To use tcmalloc memory allocator we need mysqld_safe to load libraries from /usr/local/lib More information about why to use tcmalloc instead of jemalloc here: https://forums.freebsd.org/threads/freebsd-12-x-and-mysql-5-7-and-importing-file-with-lots-of-small-lines-exhaust-ram-and-swap.72733/ PR: 248982 Sponsored by: Netzkommune GmbH
19 lines
791 B
Text
19 lines
791 B
Text
--- scripts/mysqld_safe.sh.orig 2020-06-02 11:05:42 UTC
|
|
+++ scripts/mysqld_safe.sh
|
|
@@ -359,7 +359,7 @@ mysqld_ld_preload_text() {
|
|
# running mysqld. See ld.so for details.
|
|
set_malloc_lib() {
|
|
# This list is kept intentionally simple.
|
|
- malloc_dirs="/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu"
|
|
+ malloc_dirs="/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/local/lib"
|
|
malloc_lib="$1"
|
|
|
|
# Allow --malloc-lib='' to override other settings
|
|
@@ -378,6 +378,7 @@ set_malloc_lib() {
|
|
/usr/lib64) ;;
|
|
/usr/lib/i386-linux-gnu) ;;
|
|
/usr/lib/x86_64-linux-gnu) ;;
|
|
+ /usr/local/lib) ;;
|
|
*)
|
|
log_error "--malloc-lib must be located in one of the directories: $malloc_dirs"
|
|
exit 1
|