Use explicit VESPA_LOAD_CODE_AS_HUGEPAGES
@@ -152,6 +152,9 @@ configure_vespa_malloc () {
tryfile="${VESPA_HOME}/${pre}/${suf}"
if [ -f "$tryfile" ]; then
LD_PRELOAD="$tryfile"
+ if [ "$VESPA_LOAD_CODE_AS_HUGEPAGES" ]; then
+ LD_PRELOAD="$LD_PRELOAD:"${VESPA_HOME}/${pre}/vespa/malloc/libvespa_load_as_huge.so"
+ fi
if [ "$VESPA_USE_HUGEPAGES" ]; then
export VESPA_MALLOC_HUGEPAGES="$VESPA_USE_HUGEPAGES"
log_debug_message "enabling hugepages for '$0-bin'."
@@ -162,17 +165,10 @@ configure_vespa_malloc () {
fi
}
-configure_preload() {
- if [ "$PRELOAD" ]; then
- LD_PRELOAD="$LD_PRELOAD:$PRELOAD"
- fi
-}
-
configure_valgrind
configure_huge_pages
configure_use_madvise
configure_vespa_malloc
-configure_preload
log_debug_message "Using LD_PRELOAD='$LD_PRELOAD'"
