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
 it.
 .
 gcl (2.6.7+dfsga-15) unstable; urgency=high
 .
   * ia64 fix
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ 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>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
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.7+dfsga.orig/o/alloc.c
+++ gcl-2.6.7+dfsga/o/alloc.c
@@ -1079,7 +1079,7 @@ gcl_init_alloc(void) {
   /* new_holepage = HOLEPAGE; */
   new_holepage = available_pages/10;
   /* nrbpage = INIT_NRBPAGE; */
-  nrbpage = real_maxpage/20;
+  nrbpage = available_pages/20;
   
 #ifdef __linux__
   /* Some versions of the Linux startup code are broken.
--- gcl-2.6.7+dfsga.orig/o/gbc.c
+++ gcl-2.6.7+dfsga/o/gbc.c
@@ -87,7 +87,7 @@ mark_object(object);
 #define BCHARS_TABLE (BBITS_LONG+BBYTES_CONTBLOCK)
 
 #define Shamt(x) (((((unsigned long) x) >> BBYTES_CONTBLOCK) & ~(~0UL << BBITS_LONG)))
-#define Madr(x) (mark_table+((((unsigned long) x)) >> (BCHARS_TABLE)))
+#define Madr(x) (mark_table+((((unsigned long) x)-(unsigned long)data_start) >> (BCHARS_TABLE)))
 #define get_mark_bit(x) (*(Madr(x)) >> Shamt(x) & 1)
 #define set_mark_bit(x) ((*(Madr(x))) |= (1UL << Shamt(x)))
 
@@ -1155,7 +1155,7 @@ GBC(enum type t) {
   maxpage = page(heap_end);
   
   if ((int)t >= (int)t_contiguous) {
-    j = maxpage*(PAGESIZE/(CPTR_ALIGN*SIZEOF_LONG*CHAR_SIZE)) ;
+    j = (maxpage-first_data_page)*(PAGESIZE/(CPTR_ALIGN*SIZEOF_LONG*CHAR_SIZE)) ;
     
     if (t == t_relocatable)
       j = 0;
@@ -1411,7 +1411,7 @@ FFN(siLroom_report)(void) {
     GBC(t_contiguous);
   */
   
-  vs_check_push(make_fixnum(real_maxpage));
+  vs_check_push(make_fixnum(real_maxpage-first_data_page));
   vs_push(make_fixnum(available_pages));
   vs_push(make_fixnum(ncbpage));
   vs_push(make_fixnum(maxcbpage));
