]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid performance regressions in unoptimized builds
authorPo Lu <luangruo@yahoo.com>
Tue, 15 Apr 2025 01:53:27 +0000 (09:53 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 16 Apr 2025 07:34:34 +0000 (09:34 +0200)
* src/alloc.c (lisp_malloc): Declare val register.

(cherry picked from commit b4551334508076b10a895e400beba5b3e9a5e14c)

src/alloc.c

index 167be74d2f78954b77bd021e2b89c79a0bf81a47..07ca8474bf356853bf7025a0e71263f01ce6d6cb 100644 (file)
@@ -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