Blob Blame Raw
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 gcl (2.6.12-23) unstable; urgency=medium
   * Version_2_6_13pre28
Author: Camm Maguire <>

The information above should follow the Patch Tagging Guidelines, please
checkout to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.12.orig/o/alloc.c
+++ gcl-2.6.12/o/alloc.c
@@ -1203,8 +1203,8 @@ object malloc_list=Cnil;
 maybe_set_hole_from_maxpages(void) {
-  if (rb_start==heap_end && rb_end==rb_start && rb_limit==rb_start && rb_pointer==rb_start)
-    resize_hole(available_pages/3,t_relocatable,0);
+  if (rb_pointer==rb_begin())
+    resize_hole(ufmin(phys_pages,available_pages/3),t_relocatable,0);
@@ -1358,7 +1358,7 @@ gcl_init_alloc(void *cs_start) {
-  resize_hole(ufmin(phys_pages,available_pages/3),t_relocatable,0);
+  maybe_set_hole_from_maxpages();
 #ifdef SGC	
   tm_table[(int)t_relocatable].tm_sgc = 50;