From 842fad4a1bbf0738a5be39b4b1953fb90ff3986c Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 15 Apr 2025 09:53:27 +0800 Subject: [PATCH] Avoid performance regressions in unoptimized builds * src/alloc.c (lisp_malloc): Declare val register. (cherry picked from commit b4551334508076b10a895e400beba5b3e9a5e14c) --- src/alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 167be74d2f7..07ca8474bf3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -872,11 +872,13 @@ void *lisp_malloc_loser EXTERNALLY_VISIBLE; static void * lisp_malloc (size_t nbytes, bool clearit, enum mem_type type) { + register void *val; + #ifdef GC_MALLOC_CHECK allocated_mem_type = type; #endif - void *val = clearit ? calloc (1, nbytes) : malloc (nbytes); + val = clearit ? calloc (1, nbytes) : malloc (nbytes); #if ! USE_LSB_TAG /* If the memory just allocated cannot be addressed thru a Lisp -- 2.39.5