From 792bc11387ef711ff9228c11508f763885263e3c Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 27 Jan 2026 15:03:56 +0100 Subject: [PATCH] add "USEJEMALLOC" make flag to link against "jemalloc" allocator on my linux system and usual benchmark setup this improves performance quite significantly i currently have no real means to check how windows behaves, since this does not work with wine --- src/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Makefile b/src/Makefile index 0456990f3..9a3d065f8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -94,6 +94,7 @@ # NOSDLMAIN=1 - ? # SDLMAIN=1 - ? # USELTO=1 - Enable building with LTO. +# USEJEMALLOC=1 Enable building with jemalloc Allocator to replace GLibc malloc, might improve performance # # Library configuration flags: # Everything here is an override. @@ -279,6 +280,10 @@ opts+=-fsanitize=undefined libs+=-fsanitize=undefined endif +ifdef USEJEMALLOC +libs+=-ljemalloc +endif + ifneq (,$(filter $(CC) $(CXX),clang clang++)) libs+=-fuse-ld=lld endif