From 22e573f3f3076e49ab0cbdf2978714a1f7472ba8 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Tue, 12 Jan 2021 16:44:14 -0800
Subject: [PATCH] Address #89: Remove C code to scavenge read-only space

Since we got rid of the symbol `*scavenge-read-only-space*`, we can
never scavenge the read-only space, so remove the C code that
scavenges the space.

Get rid of the unused var `read_only_space_size` too.
---
 src/lisp/gencgc.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/lisp/gencgc.c b/src/lisp/gencgc.c
index a58b7c236..53881f08d 100644
--- a/src/lisp/gencgc.c
+++ b/src/lisp/gencgc.c
@@ -7722,7 +7722,7 @@ static void
 garbage_collect_generation(int generation, int raise)
 {
     unsigned long i;
-    unsigned long read_only_space_size, static_space_size;
+    unsigned long static_space_size;
 
 #if defined(i386) || defined(__x86_64)
     invalid_stack_start = (void *) control_stack;
@@ -7865,17 +7865,6 @@ garbage_collect_generation(int generation, int raise)
     printf("Done scavenging the scavenger hooks.\n");
 #endif
 
-#if 0
-    if (SymbolValue(SCAVENGE_READ_ONLY_SPACE) != NIL) {
-	read_only_space_size =
-	    (lispobj *) SymbolValue(READ_ONLY_SPACE_FREE_POINTER) -
-	    read_only_space;
-	fprintf(stderr, "Scavenge read only space: %ld bytes\n",
-		read_only_space_size * sizeof(lispobj));
-	scavenge(read_only_space, read_only_space_size);
-    }
-#endif
-
     static_space_size = (lispobj *) SymbolValue(STATIC_SPACE_FREE_POINTER)
 	- static_space;
     if (gencgc_verbose > 1)
-- 
GitLab