d60bed4
Description: <short summary of the patch>
d60bed4
 TODO: Put a short summary on the line above and replace this paragraph
d60bed4
 with a longer explanation of this change. Complete the meta-information
d60bed4
 with other relevant fields (see below for details). To make it easier, the
d60bed4
 information below has been extracted from the changelog. Adjust it or drop
d60bed4
 it.
d60bed4
 .
d60bed4
 gcl (2.6.12-84) unstable; urgency=medium
d60bed4
 .
d60bed4
   * Version_2_6_13pre80
d60bed4
Author: Camm Maguire <camm@debian.org>
d60bed4
d60bed4
---
d60bed4
The information above should follow the Patch Tagging Guidelines, please
d60bed4
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
d60bed4
are templates for supplementary fields that you might want to add:
d60bed4
d60bed4
Origin: <vendor|upstream|other>, <url of original patch>
d60bed4
Bug: <url in upstream bugtracker>
d60bed4
Bug-Debian: https://bugs.debian.org/<bugnumber>
d60bed4
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
d60bed4
Forwarded: <no|not-needed|url proving that it has been forwarded>
d60bed4
Reviewed-By: <name and email of someone who approved the patch>
d60bed4
Last-Update: 2019-03-28
d60bed4
d60bed4
--- gcl-2.6.12.orig/o/alloc.c
d60bed4
+++ gcl-2.6.12/o/alloc.c
d60bed4
@@ -329,7 +329,7 @@ empty_relblock(void) {
d60bed4
 void
d60bed4
 setup_rb(bool preserve_rb_pointerp) {
d60bed4
 
d60bed4
-  int lowp=new_rb_start!=rb_start || rb_high();
d60bed4
+  int lowp=rb_high();
d60bed4
 
d60bed4
   update_pool(2*(nrbpage-page(rb_size())));
d60bed4
   rb_start=new_rb_start;
d60bed4
@@ -349,10 +349,13 @@ resize_hole(ufixnum hp,enum type tp,bool
d60bed4
   char *start=rb_begin(),*new_start=heap_end+hp*PAGESIZE;
d60bed4
   ufixnum size=rb_pointer-start;
d60bed4
 
d60bed4
-  if (!in_placep &&
d60bed4
-      ((new_start<=start && start
d60bed4
+  if (!in_placep && (rb_high() ?
d60bed4
+		     new_start+size>rb_end :
d60bed4
+		     new_start+(nrbpage<
d60bed4
+		     /* 0 (20190401  never reached)*/
d60bed4
+		     )) {
d60bed4
     if (sSAnotify_gbcA->s.s_dbind != Cnil)
d60bed4
-      emsg("Toggling relblock when resizing hole to %lu\n",hp);
d60bed4
+      emsg("[GC Toggling relblock when resizing hole to %lu]\n",hp);
d60bed4
     tm_table[t_relocatable].tm_adjgbccnt--;
d60bed4
     GBC(t_relocatable);
d60bed4
     return resize_hole(hp,tp,in_placep);
d60bed4
@@ -389,7 +392,7 @@ alloc_page(long n) {
d60bed4
       d=(available_pages/3)
d60bed4
       
d60bed4
       if (sSAnotify_gbcA && sSAnotify_gbcA->s.s_dbind != Cnil)
d60bed4
-	emsg("Hole overrun\n");
d60bed4
+	emsg("[GC Hole overrun]\n");
d60bed4
 
d60bed4
       resize_hole(d+nn,t_relocatable,0);
d60bed4
 
d60bed4
@@ -852,7 +855,7 @@ add_pages(struct typemanager *tm,fixnum
d60bed4
 
d60bed4
     if (rb_high() && m>((rb_start-heap_end)>>PAGEWIDTH)) {
d60bed4
       if (sSAnotify_gbcA->s.s_dbind != Cnil)
d60bed4
-	emsg("Moving relblock low before expanding relblock pages\n");
d60bed4
+	emsg("[GC Moving relblock low before expanding relblock pages]\n");
d60bed4
       tm_table[t_relocatable].tm_adjgbccnt--;
d60bed4
       GBC(t_relocatable);
d60bed4
     }