gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: GCL allocation


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: GCL allocation
Date: 10 Dec 2003 16:50:16 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  While looking into some GBC issues for Vadim, I decided it
was time at long last to get some (preliminary) gprof profiling
support in.  Usability feedback on this most appreciated.

Unfortunately, I cannot make absolutely clean patches, as our cvs is
still unavailable.  I believe the following should work when applied
against the last cvs update (was to be 2.6.1-19) before shutdown.  Of
course, Matt, for your reader patch, you would need the latest cvs
version (was to be gclcvs_2.7.0-16), against which the following
should also work:

=============================================================================
--- ../gclcvs-2.7.0/o/alloc.c   2003-11-25 20:27:20.000000000 +0000
+++ o/alloc.c   2003-12-10 21:34:00.000000000 +0000
@@ -718,13 +718,15 @@
 }
 
 
-
-
 void
 gcl_init_alloc(void) {
 
   int i;
   static int initialized;
+#ifdef GCL_GPROF
+   extern void *_start;
+   unsigned textpage=2*((void *)&etext-(void *)&_start)/PAGESIZE;
+#endif
   
   if (initialized) return;
   initialized=1;
@@ -740,6 +742,11 @@
 #endif 
   
   holepage = INIT_HOLEPAGE;
+#ifdef GCL_GPROF
+  if (holepage<textpage)
+     holepage=textpage;
+#endif
+
   new_holepage = HOLEPAGE;
   nrbpage = INIT_NRBPAGE;
   
@@ -824,6 +831,10 @@
   ncb = 0;
   ncbpage = 0;
   maxcbpage = 512;
+#ifdef GCL_GPROF
+  if (maxcbpage<textpage)
+     maxcbpage=textpage;
+#endif
   
 }
 
@@ -1070,6 +1081,74 @@
        RETURN1((make_fixnum(new_holepage)));
 }
 
+
+#ifdef GCL_GPROF
+
+static unsigned long start,end,gprof_on;
+
+DEFUN_NEW("GPROF-START",object,fSgprof_start,SI
+       ,0,0,NONE,OO,OO,OO,OO,(void),"")
+{
+  extern void monstartup(unsigned long,unsigned long);
+  extern void *_start;
+
+  if (!gprof_on) {
+    start=start ? start : (unsigned long)&_start;
+    end=end ? end : (unsigned long)core_end;
+    monstartup(start,end);
+    gprof_on=1;
+  }
+
+  return Cnil;
+
+}
+
+DEFUN_NEW("GPROF-SET",object,fSgprof_set,SI
+       ,2,2,NONE,OI,IO,OO,OO,(fixnum dstart,fixnum dend),"")
+{
+
+  start=dstart;
+  end=dend;
+
+  return Cnil;
+
+}
+
+DEFUN_NEW("GPROF-QUIT",object,fSgprof_quit,SI
+       ,0,0,NONE,OO,OO,OO,OO,(void),"")
+{
+  extern void _mcleanup(void);
+  char b[PATH_MAX],b1[PATH_MAX];
+  FILE *pp;
+  unsigned n;
+
+  if (!gprof_on)
+    return Cnil;
+
+  if (!getwd(b))
+    FEerror("Cannot get working directory", 0);
+  if (chdir(P_tmpdir))
+    FEerror("Cannot change directory to tmpdir", 0);
+  _mcleanup();
+  if (snprintf(b1,sizeof(b1),"gprof %s",kcl_self)<=0)
+    FEerror("Cannot write gprof command line", 0);
+  if (!(pp=popen(b1,"r")))
+    FEerror("Cannot open gprof pipe", 0);
+  while ((n=fread(b1,1,sizeof(b1),pp)))
+    if (!fwrite(b1,1,n,stdout))
+      FEerror("Cannot write gprof output",0);
+  if (pclose(pp)<0)
+    FEerror("Cannot close gprof pipe", 0);
+  if (chdir(b))
+    FEerror("Cannot restore working directory", 0);
+  gprof_on=0;
+
+  return Cnil;
+
+}
+
+#endif
+
 DEFUN_NEW("SET-HOLE-SIZE",object,fSset_hole_size,SI
        ,1,2,NONE,OI,IO,OO,OO,(fixnum npages,...),"")
 {
--- ../gclcvs-2.7.0/configure.in        2003-12-02 15:44:14.000000000 +0000
+++ configure.in        2003-12-10 16:36:59.000000000 +0000
@@ -282,12 +285,19 @@
 AC_ARG_ENABLE(debug,
        [ --enable-debug builds gcl with -g in CFLAGS to enable running under 
gdb ]
        ,,enable_debug="no")
+AC_ARG_ENABLE(gprof,
+       [ --enable-gprof builds gcl with -pg in CFLAGS to enable profiling with 
gprof ]
+       ,,enable_gprof="no")
 AC_ARG_ENABLE(static,[ --enable-static will link your GCL against static as 
opposed to shared system libraries ] ,
         [enable_static=$enableval],[enable_static="$def_static"])
 AC_ARG_ENABLE(pic,
        [ --enable-pic builds gcl with -fPIC in CFLAGS ]
        ,,enable_pic="$def_pic")
 
 AC_ARG_ENABLE(oldgmp,
        [ --enable-oldgmp will link against gmp2 instead of gmp3 ]
        ,,enable_oldgmp="$def_oldgmp")
 
 AC_ARG_ENABLE(dynsysgmp,
        [ --enable-dynsysgmp will link against the system libgmp3 overriding 
certain functions with patched versions from the local source ]
        ,,enable_dynsysgmp="no")
@@ -332,6 +342,7 @@
        exit 1
 fi
 
+TLIBS=""
 if test "$enable_static" = "yes" ; then
    TLIBS="-static $TLIBS";
 fi
@@ -391,6 +402,12 @@
        TO2FLAGS="-O"
 fi
 
+if test "$enable_gprof" = "yes" ; then
+       TCFLAGS="$TCFLAGS -pg"
+       TLIBS="$TLIBS -pg"
+       AC_DEFINE(GCL_GPROF)
+fi
+
 AC_CHECK_PROGS(AWK,gawk nawk awk,"")
 
 # gcc on ppc cannot compile our new_init.c with full opts --CM
--- ../gclcvs-2.7.0/acconfig.h  2003-09-04 03:09:38.000000000 +0000
+++ acconfig.h  2003-12-10 16:37:53.000000000 +0000
@@ -230,10 +230,11 @@
 #undef __SHORT_LIMB
 #undef __LONG_LONG_LIMB
 
-/* Define if we have the JAPI library on board */
 #undef HAVE_JAPI_H
 
 #undef HAVE_XDR
 #undef ENDIAN_ALREADY_DEFINED
 #undef USE_CLEANUP
 #undef SIZEOF_CONTBLOCK
+
+#undef GCL_GPROF
=============================================================================

After applying, you will need to run 'autoheader' and then
'autoconf'.  Then you can use the --enable-gprof option to build in
gprof support.  Here is a sample session using Vadim's tests:

=============================================================================
>(si::gprof-start)

NIL

>(load "/tmp/g.lisp")

Loading /tmp/g.lisp
Finished loading /tmp/g.lisp
T

>(pass)
***** Starting pass #1
real time : 8.450 secs
run time  : 11.390 secs
8862/9600 100.0% 12 CONS RATIO LONG-FLOAT COMPLEX STRUCTURE
   1/28    14.1%    FIXNUM SHORT-FLOAT CHARACTER RANDOM-STATE READTABLE NIL
  49/49    68.2%    SYMBOL STREAM
   1/2     12.8%    PACKAGE
   1/38    45.2%    ARRAY HASH-TABLE VECTOR BIT-VECTOR PATHNAME CCLOSURE 
FAT-STRING
  22/32    55.7%    STRING
   3/27    96.5%    CFUN BIGNUM
   6/6     86.8%    SFUN GFUN CFDATA SPICE NIL

4069/4800         4 contiguous (105 blocks)
     91             hole
     50     0.1% 90 relocatable

 8945 pages for cells
13155 total pages
112758 pages available
 5159 pages in heap but not gc'd + pages needed for gc marking
131072 maximum pages
***** End of pass #1
***** Run time: 11.45  GC time: 11.11 (97.0%)
NIL

>(si::gprof-quit)

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 45.71      2.98     2.98      101     0.03     0.03  sweep_phase
 30.06      4.94     1.96 151663730     0.00     0.00  mark_object
 21.47      6.34     1.40   394607     0.00     0.00  mark_cons
  1.53      6.44     0.10     8762     0.00     0.00  add_page_to_freelist
  0.77      6.49     0.05  3000968     0.00     0.00  make_cons
  0.46      6.52     0.03        1     0.03     6.52  Lmake_list
  0.00      6.52     0.00     8851     0.00     0.00  alloc_page
  0.00      6.52     0.00     1434     0.00     0.00  symbol_value
  0.00      6.52     0.00      918     0.00     0.00  writec_stream
  0.00      6.52     0.00      842     0.00     0.00  rl_putc_em
  0.00      6.52     0.00      835     0.00     0.00  ctl_advance
  0.00      6.52     0.00      712     0.00     0.00  copy_relblock
  0.00      6.52     0.00      627     0.00     0.01  eval
  0.00      6.52     0.00      387     0.00     0.00  fmt_set_param
  0.00      6.52     0.00      316     0.00     0.00  funcall
  0.00      6.52     0.00      303     0.00     0.00  mark_stack_carefully
  0.00      6.52     0.00      289     0.00     0.00  c_apply_n
  0.00      6.52     0.00      288     0.00     0.00  IapplyVector
  0.00      6.52     0.00      276     0.00     0.00  funcall_no_event
  0.00      6.52     0.00      275     0.00     0.00  writec_PRINTstream
  0.00      6.52     0.00      251     0.00     0.00  alloc_object
  0.00      6.52     0.00      220     0.00     0.00  fLnth
  0.00      6.52     0.00      218     0.00     0.00  bind_var
  0.00      6.52     0.00      202     0.00     0.00  runtime
  0.00      6.52     0.00      172     0.00     0.00  rl_getc_em
  0.00      6.52     0.00      165     0.00     0.00  check_type_number
  0.00      6.52     0.00      152     0.00     0.00  fmt_max_param
  0.00      6.52     0.00      138     0.00     0.00  fmt_tempstr
  0.00      6.52     0.00      137     0.00     0.00  readc_stream
  0.00      6.52     0.00      126     0.00     0.00  flush_stream
  0.00      6.52     0.00      116     0.00     0.00  read_object
  0.00      6.52     0.00      105     0.00     0.00  Fif
  0.00      6.52     0.00      101     0.00     0.06  GBC
  0.00      6.52     0.00      101     0.00     0.00  clear_stack
  0.00      6.52     0.00      101     0.00     0.00  mark_c_stack
  0.00      6.52     0.00      101     0.00     0.03  mark_phase
  0.00      6.52     0.00       99     0.00     0.00  car
  0.00      6.52     0.00       99     0.00     0.00  eql
  0.00      6.52     0.00       99     0.00     0.00  identity
  0.00      6.52     0.00       99     0.00     0.00  test_eql
  0.00      6.52     0.00       95     0.00     0.00  fmt_advance
  0.00      6.52     0.00       92     0.00     0.00  file_column
  0.00      6.52     0.00       84     0.00     0.00  stack_cons
  0.00      6.52     0.00       78     0.00     0.00  string_equal
  0.00      6.52     0.00       76     0.00     0.00  digit_weight
  0.00      6.52     0.00       69     0.00     0.00  make_fixnum1
  0.00      6.52     0.00       68     0.00     0.00  write_object
  0.00      6.52     0.00       62     0.00     0.00  designate_package
  0.00      6.52     0.00       59     0.00     0.00  member_string_equal
  0.00      6.52     0.00       57     0.00     0.00  bds_unwind
  0.00      6.52     0.00       57     0.00     0.00  macro_expand
  0.00      6.52     0.00       57     0.00     0.00  writec_queue
  0.00      6.52     0.00       56     0.00     0.00  rl_ungetc_em
  0.00      6.52     0.00       55     0.00     0.00  format
  0.00      6.52     0.00       54     0.00     0.00  find_special
  0.00      6.52     0.00       53     0.00     0.00  Fprogn
  0.00      6.52     0.00       53     0.00     0.00  fixnum_add
  0.00      6.52     0.00       53     0.00     0.00  let_bind
  0.00      6.52     0.00       53     0.00     0.00  number_plus
  0.00      6.52     0.00       52     0.00     0.00  Flet
  0.00      6.52     0.00       52     0.00     0.00  let_var_list
  0.00      6.52     0.00       51     0.00     0.00  fmt_not_colon
  0.00      6.52     0.00       49     0.00     0.00  assoc_eq
  0.00      6.52     0.00       48     0.00     0.00  Lplus
  0.00      6.52     0.00       45     0.00     0.00  Lcar
  0.00      6.52     0.00       45     0.00     0.00  digitp
  0.00      6.52     0.00       45     0.00     0.00  pack_hash
  0.00      6.52     0.00       43     0.00     0.00  fmt_not_atsign
  0.00      6.52     0.00       42     0.00     0.00  Llist
  0.00      6.52     0.00       42     0.00     0.00  intern
  0.00      6.52     0.00       40     0.00     0.00  current_package
  0.00      6.52     0.00       37     0.00     0.00  Ftagbody
  0.00      6.52     0.00       37     0.00     0.00  Lcdr
  0.00      6.52     0.00       37     0.00     0.00  parse_key
  0.00      6.52     0.00       36     0.00     0.00  setq
  0.00      6.52     0.00       35     0.00     0.00  Lassoc
  0.00      6.52     0.00       35     0.00     0.00  Lassoc_or_rassoc
  0.00      6.52     0.00       35     0.00     0.00  check_stream
  0.00      6.52     0.00       35     0.00     0.00  feof1
  0.00      6.52     0.00       35     0.00     0.00  setupTEST
  0.00      6.52     0.00       35     0.00     0.00  stream_at_end
  0.00      6.52     0.00       35     0.00     0.00  super_funcall
  0.00      6.52     0.00       32     0.00     0.00  fmt_ascii
  0.00      6.52     0.00       32     0.00     0.00  princ
  0.00      6.52     0.00       31     0.00     0.00  fmt_decimal
  0.00      6.52     0.00       31     0.00     0.00  fmt_integer
  0.00      6.52     0.00       30     0.00     0.00  Lnthcdr
  0.00      6.52     0.00       30     0.00     0.00  fLnull
  0.00      6.52     0.00       30     0.00     0.00  fixint
  0.00      6.52     0.00       30     0.00     0.00  nthcdr
  0.00      6.52     0.00       30     0.00     0.00  zero_big
  0.00      6.52     0.00       29     0.00     0.00  Lleft_parenthesis_reader
  0.00      6.52     0.00       29     0.00     0.00  fmt_up_and_out
  0.00      6.52     0.00       28     0.00     0.00  number_to_double
  0.00      6.52     0.00       27     0.00     0.00  edit_double
  0.00      6.52     0.00       27     0.00     0.00  number_zerop
  0.00      6.52     0.00       25     0.00     0.00  Ivs_values
  0.00      6.52     0.00       23     0.00     0.00  check_type_string
  0.00      6.52     0.00       23     0.00     0.00  fLformat
  0.00      6.52     0.00       23     0.00     0.00  fmt_tabulate
  0.00      6.52     0.00       23     0.00     0.00  number_divide
  0.00      6.52     0.00       22     0.00     0.00  Ieval
  0.00      6.52     0.00       22     0.00     0.00  verify_big_or_zero
  0.00      6.52     0.00       21     0.00     0.00  unread_char
  0.00      6.52     0.00       21     0.00     0.00  unreadc_stream
  0.00      6.52     0.00       18     0.00     0.00  Lzerop
  0.00      6.52     0.00       18     0.00     0.00  fmt_skip
  0.00      6.52     0.00       16     0.00     0.00  insert_contblock
  0.00      6.52     0.00       15     0.00     0.00  Lnconc
  0.00      6.52     0.00       15     0.00     0.00  parse_number
  0.00      6.52     0.00       14     0.00     0.00  Fpush
  0.00      6.52     0.00       14     0.00     0.00  Ldivide
  0.00      6.52     0.00       14     0.00     0.00  alloc_contblock
  0.00      6.52     0.00       14     0.00     0.00  fmt_fix_float
  0.00      6.52     0.00       14     0.00     0.00  fmt_percent
  0.00      6.52     0.00       14     0.00     0.00  writestr_stream
  0.00      6.52     0.00       12     0.00     0.00  call_after_gbc_hook
  0.00      6.52     0.00       12     0.00     0.00  grow_linear
  0.00      6.52     0.00       12     0.00     0.00  new_bignum
  0.00      6.52     0.00       12     0.00     0.00  normalize_big
  0.00      6.52     0.00       12     0.00     0.00  number_minusp
  0.00      6.52     0.00       11     0.00     0.00  Fsetq
  0.00      6.52     0.00       11     0.00     0.00  add_int_big
  0.00      6.52     0.00       11     0.00     0.00  alloc_relblock
  0.00      6.52     0.00       11     0.00     0.00  fmt_not_colon_atsign
  0.00      6.52     0.00       11     0.00     0.00  maybe_replace_big
  0.00      6.52     0.00       11     0.00     0.00  mul_int_big
  0.00      6.52     0.00       10     0.00     0.00  Lterpri
  0.00      6.52     0.00       10     0.00     0.00  fmt_conditional
  0.00      6.52     0.00       10     0.00     0.00  terpri
  0.00      6.52     0.00        9     0.00     0.00  current_readtable
  0.00      6.52     0.00        9     0.00     0.00  read_object_non_recursive
  0.00      6.52     0.00        9     0.00     0.00  setup_READ
  0.00      6.52     0.00        9     0.00     0.00  symbol_function
  0.00      6.52     0.00        8     0.00     0.00  Ffunction
  0.00      6.52     0.00        8     0.00     0.00  Lappend
  0.00      6.52     0.00        8     0.00     0.00  append
  0.00      6.52     0.00        8     0.00     0.00  copy_simple_string
  0.00      6.52     0.00        8     0.00     0.00  fLapply
  0.00      6.52     0.00        8     0.00     0.00  find_package
  0.00      6.52     0.00        8     0.00     0.00  fmt_iteration
  0.00      6.52     0.00        8     0.00     0.00  normalize_big_to_object
  0.00      6.52     0.00        7     0.00     0.00  check_type_stream
  0.00      6.52     0.00        6     0.00     0.00  integer_divide1
  0.00      6.52     0.00        6     0.00     0.00  
integer_quotient_remainder_1
  0.00      6.52     0.00        6     0.00     0.36  simple_symlispcall
  0.00      6.52     0.00        5     0.00     0.00  cleanupPRINT
  0.00      6.52     0.00        5     0.00     0.00  flush_queue
  0.00      6.52     0.00        5     0.00     0.00  setupPRINTdefault
  0.00      6.52     0.00        5     0.00     0.00  write_str
  0.00      6.52     0.00        4     0.00     0.00  Ldouble_quote_reader
  0.00      6.52     0.00        4     0.00     0.00  Lfresh_line
  0.00      6.52     0.00        4     0.00     0.00  Lget_internal_run_time
  0.00      6.52     0.00        4     0.00     0.00  coerce_stream
  0.00      6.52     0.00        4     0.00     0.00  read_string
  0.00      6.52     0.00        3     0.00     0.72  
Iinvoke_c_function_from_value_stack
  0.00      6.52     0.00        3     0.00     0.00  Lfind_package
  0.00      6.52     0.00        3     0.00     0.72  Lformat
  0.00      6.52     0.00        3     0.00     0.00  Lminus
  0.00      6.52     0.00        3     0.00     0.00  Lprin1
  0.00      6.52     0.00        3     0.00     0.72  Lread
  0.00      6.52     0.00        3     0.00     0.00  big_to_double
  0.00      6.52     0.00        3     0.00     0.00  fLeval
  0.00      6.52     0.00        3     0.00     0.00  find_symbol
  0.00      6.52     0.00        3     0.00     0.00  get_gcd
  0.00      6.52     0.00        3     0.00     0.00  list
  0.00      6.52     0.00        3     0.00     0.00  make_longfloat
  0.00      6.52     0.00        3     0.00     0.00  make_one
  0.00      6.52     0.00        3     0.00     0.00  make_ratio
  0.00      6.52     0.00        3     0.00     0.00  make_symbol
  0.00      6.52     0.00        3     0.00     0.00  number_minus
  0.00      6.52     0.00        3     0.00     0.00  potential_number_p
  0.00      6.52     0.00        3     0.00     0.00  prin1
  0.00      6.52     0.00        3     0.00     0.00  princ_char
  0.00      6.52     0.00        3     0.00     0.00  reset_cstack_limit
  0.00      6.52     0.00        3     0.00     0.00  siLgbc_time
  0.00      6.52     0.00        3     0.00     0.00  siLreset_stack_limits
  0.00      6.52     0.00        3     0.00     0.00  symlispcall
  0.00      6.52     0.00        2     0.00     0.00  Fmultiple_value_list
  0.00      6.52     0.00        2     0.00     0.00  coerce_to_pathname
  0.00      6.52     0.00        2     0.00     0.00  fLget_internal_real_time
  0.00      6.52     0.00        2     0.00     0.00  insert_maybe_sgc_contblock
  0.00      6.52     0.00        2     0.00     0.00  kar
  0.00      6.52     0.00        2     0.00     0.00  lambda_bind
  0.00      6.52     0.00        2     0.00     0.00  lex_block_bind
  0.00      6.52     0.00        2     0.00     0.00  make_pathname
  0.00      6.52     0.00        2     0.00     0.00  make_shortfloat
  0.00      6.52     0.00        2     0.00     0.00  perm_writable
  0.00      6.52     0.00        2     0.00     0.00  string_eq
  0.00      6.52     0.00        1     0.00     0.00  Fdefun
  0.00      6.52     0.00        1     0.00     0.00  Fdo
  0.00      6.52     0.00        1     0.00     0.00  Fdolist
  0.00      6.52     0.00        1     0.00     0.00  Fquote
  0.00      6.52     0.00        1     0.00     0.00  Ifuncall_n
  0.00      6.52     0.00        1     0.00     0.00  Imacro_expand1
  0.00      6.52     0.00        1     0.00     0.00  L1
  0.00      6.52     0.00        1     0.00     0.00  LI19
  0.00      6.52     0.00        1     0.00     0.00  LI21
  0.00      6.52     0.00        1     0.00     0.00  Lcons
  0.00      6.52     0.00        1     0.00     0.00  Lload
  0.00      6.52     0.00        1     0.00     0.00  Lone_plus
  0.00      6.52     0.00        1     0.00     0.00  Lreverse
  0.00      6.52     0.00        1     0.00     0.00  Lsingle_quote_reader
  0.00      6.52     0.00        1     0.00     0.00  Ltimes
  0.00      6.52     0.00        1     0.00     0.00  Lvalues
  0.00      6.52     0.00        1     0.00     0.00  Lvalues_list
  0.00      6.52     0.00        1     0.00     0.00  alloc_simple_string
  0.00      6.52     0.00        1     0.00     0.00  check_type_array
  0.00      6.52     0.00        1     0.00     0.00  
check_type_non_negative_integer
  0.00      6.52     0.00        1     0.00     0.00  
check_type_or_pathname_string_symbol_stream
  0.00      6.52     0.00        1     0.00     0.00  
check_type_or_symbol_string
  0.00      6.52     0.00        1     0.00     0.00  clear_compiler_properties
  0.00      6.52     0.00        1     0.00     0.00  close_stream
  0.00      6.52     0.00        1     0.00     0.00  coerce_to_namestring
  0.00      6.52     0.00        1     0.00     0.00  coerce_to_string
  0.00      6.52     0.00        1     0.00     0.00  deallocate_stream_buffer
  0.00      6.52     0.00        1     0.00     0.00  do_var_list
  0.00      6.52     0.00        1     0.00     0.00  fLfuncall
  0.00      6.52     0.00        1     0.00     0.00  fSallocate_growth
  0.00      6.52     0.00        1     0.00     0.00  fSgprof_quit
  0.00      6.52     0.00        1     0.00     0.00  fSuse_fast_links
  0.00      6.52     0.00        1     0.00     0.00  fmt_newline
  0.00      6.52     0.00        1     0.00     0.00  getf
  0.00      6.52     0.00        1     0.00     0.00  getwd
  0.00      6.52     0.00        1     0.00     0.00  ifuncall2
  0.00      6.52     0.00        1     0.00     0.00  listA
  0.00      6.52     0.00        1     0.00     0.00  merge_pathnames
  0.00      6.52     0.00        1     0.00     0.00  namestring
  0.00      6.52     0.00        1     0.00     0.00  number_times
  0.00      6.52     0.00        1     0.00     0.00  one_plus
  0.00      6.52     0.00        1     0.00     0.00  open_stream
  0.00      6.52     0.00        1     0.00     0.00  parse_namestring
  0.00      6.52     0.00        1     0.00     0.00  quick_call_sfun
  0.00      6.52     0.00        1     0.00     0.00  reverse
  0.00      6.52     0.00        1     0.00     0.00  setup_stream_buffer
  0.00      6.52     0.00        1     0.00     0.00  siLroom_report
  0.00      6.52     0.00        1     0.00     0.00  t_from_type
  0.00      6.52     0.00        1     0.00     0.00  user_match

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.
 
 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
           else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this 
           function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
           the function in the gprof listing. If the index is
           in parenthesis it shows where it would appear in
           the gprof listing if it were to be printed.

                     Call graph (explanation follows)


granularity: each sample hit covers 4 byte(s) for 0.15% of 6.52 seconds

index % time    self  children    called     name
[1]    100.0    0.00    6.52       9+2037    <cycle 1 as a whole> [1]
                0.00    6.52     627+1164        eval <cycle 1> [3]
                0.00    0.00      53             let_bind <cycle 1> [21]
                0.00    0.00       2             Fmultiple_value_list <cycle 1> 
[22]
                0.00    0.00      29             Lleft_parenthesis_reader 
<cycle 1> [23]
                0.00    0.00      14             Fpush <cycle 1> [26]
                0.00    0.00     316             funcall <cycle 1> [27]
                0.00    0.00       1             Fdolist <cycle 1> [31]
                0.00    0.00       1             Fdo <cycle 1> [34]
                0.00    0.00     116             read_object <cycle 1> [35]
                0.00    0.00       2             lambda_bind <cycle 1> [37]
                0.00    0.00       1             Fdefun <cycle 1> [38]
                0.00    0.00     289             c_apply_n <cycle 1> [48]
                0.00    0.00     288             IapplyVector <cycle 1> [49]
                0.00    0.00     105             Fif <cycle 1> [61]
                0.00    0.00      53             Fprogn <cycle 1> [82]
                0.00    0.00      52             Flet <cycle 1> [85]
                0.00    0.00      37             Ftagbody <cycle 1> [96]
                0.00    0.00      22             Ieval <cycle 1> [125]
                0.00    0.00      11             Fsetq <cycle 1> [144]
                0.00    0.00       9             read_object_non_recursive 
<cycle 1> [154]
                0.00    0.00       8             fLapply <cycle 1> [159]
                0.00    0.00       3             fLeval <cycle 1> [179]
                0.00    0.00       1             clear_compiler_properties 
<cycle 1> [220]
                0.00    0.00       1             ifuncall2 <cycle 1> [233]
                0.00    0.00       1             fLfuncall <cycle 1> [226]
                0.00    0.00       1             Lsingle_quote_reader <cycle 1> 
[211]
                0.00    0.00       1             Lload <cycle 1> [209]
                0.00    0.00       1             Imacro_expand1 <cycle 1> [205]
-----------------------------------------------
                                                 <spontaneous>
[2]    100.0    0.00    6.52                 LI1 [2]
                0.00    2.17       6/6           simple_symlispcall [11]
                0.00    2.17       3/9           funcall <cycle 1> [27]
                0.00    2.17       3/3           Lformat [13]
                0.00    0.00       3/3           siLreset_stack_limits [193]
                0.00    0.00       3/3           symlispcall [194]
                0.00    0.00       3/42          Llist [94]
                0.00    0.00       3/4           Lfresh_line [171]
                0.00    0.00       3/3           princ_char [190]
                0.00    0.00       3/3           Lfind_package [175]
-----------------------------------------------
                                1164             eval <cycle 1> [3]
                                   1             lambda_bind <cycle 1> [37]
                                   2             Fmultiple_value_list <cycle 1> 
[22]
                                   2             funcall <cycle 1> [27]
                                   2             Fdolist <cycle 1> [31]
                                   3             fLeval <cycle 1> [179]
                                   5             Lload <cycle 1> [209]
                                  22             Ieval <cycle 1> [125]
                                  28             Fpush <cycle 1> [26]
                                  45             Ftagbody <cycle 1> [96]
                                  78             Fprogn <cycle 1> [82]
                                 105             Fif <cycle 1> [61]
                                 118             Fdo <cycle 1> [34]
                                 216             let_bind <cycle 1> [21]
[3]    100.0    0.00    6.52     627+1164    eval <cycle 1> [3]
                0.03    6.49       1/1           Lmake_list [4]
                0.00    0.00       8/8           Lappend [24]
                0.00    0.00       1/1           Lreverse [29]
                0.00    0.00     276/276         funcall_no_event [50]
                0.00    0.00      52/57          bds_unwind [76]
                0.00    0.00      48/48          Lplus [89]
                0.00    0.00      45/45          Lcar [90]
                0.00    0.00      39/42          Llist [94]
                0.00    0.00      37/37          Lcdr [97]
                0.00    0.00      35/35          Lassoc_or_rassoc [101]
                0.00    0.00      35/35          Lassoc [100]
                0.00    0.00      30/30          Lnthcdr [111]
                0.00    0.00      18/18          Lzerop [129]
                0.00    0.00      15/15          Lnconc [132]
                0.00    0.00      14/14          Ldivide [134]
                0.00    0.00      10/10          Lterpri [150]
                0.00    0.00       8/8           Ffunction [157]
                0.00    0.00       4/4           Lget_internal_run_time [172]
                0.00    0.00       3/3           siLgbc_time [192]
                0.00    0.00       3/3           Lminus [176]
                0.00    0.00       1/1           Ltimes [212]
                0.00    0.00       1/1           Lvalues [213]
                0.00    0.00       1/1           siLroom_report [242]
                0.00    0.00       1/1           Lvalues_list [214]
                0.00    0.00       1/4           Lfresh_line [171]
                0.00    0.00       1/1           Lcons [208]
                0.00    0.00       1/1           Lone_plus [210]
                0.00    0.00       1/1           Fquote [203]
                                 276             funcall <cycle 1> [27]
                                 105             Fif <cycle 1> [61]
                                  52             Flet <cycle 1> [85]
                                  14             Fpush <cycle 1> [26]
                                  11             Fsetq <cycle 1> [144]
                                   2             Fmultiple_value_list <cycle 1> 
[22]
                                   1             Imacro_expand1 <cycle 1> [205]
                                   1             Lload <cycle 1> [209]
                                   1             Fdolist <cycle 1> [31]
                                   1             Fdo <cycle 1> [34]
                                   1             Fprogn <cycle 1> [82]
                                   1             Fdefun <cycle 1> [38]
                                1164             eval <cycle 1> [3]
-----------------------------------------------
                0.03    6.49       1/1           eval <cycle 1> [3]
[4]    100.0    0.03    6.49       1         Lmake_list [4]
                0.05    6.44 3000000/3000968     make_cons [5]
                0.00    0.00       1/37          parse_key [98]
                0.00    0.00       1/1           
check_type_non_negative_integer [217]
-----------------------------------------------
                0.00    0.00       1/3000968     Fdefun <cycle 1> [38]
                0.00    0.00       1/3000968     malloc [39]
                0.00    0.00       3/3000968     intern [36]
                0.00    0.00       5/3000968     listA [33]
                0.00    0.00       8/3000968     reverse [30]
                0.00    0.00       8/3000968     funcall <cycle 1> [27]
                0.00    0.00       8/3000968     lex_block_bind [28]
                0.00    0.00      14/3000968     Fpush <cycle 1> [26]
                0.00    0.00      32/3000968     append [25]
                0.00    0.00      77/3000968     Lleft_parenthesis_reader 
<cycle 1> [23]
                0.00    0.00     157/3000968     Fmultiple_value_list <cycle 1> 
[22]
                0.00    0.00     654/3000968     bind_var [20]
                0.05    6.44 3000000/3000968     Lmake_list [4]
[5]     99.5    0.05    6.44 3000968         make_cons [5]
                0.00    6.33    8762/8774        alloc_page <cycle 4> [41]
                0.10    0.00    8762/8762        add_page_to_freelist [17]
                0.00    0.01      12/8774        GBC <cycle 4> [7]
                0.00    0.00      12/12          grow_linear [140]
                0.00    0.00      12/12          call_after_gbc_hook [139]
-----------------------------------------------
[6]     97.2    0.00    6.34    8774+178     <cycle 4 as a whole> [6]
                0.00    6.34     101             GBC <cycle 4> [7]
-----------------------------------------------
                                  89             alloc_page <cycle 4> [41]
                0.00    0.01      12/8774        make_cons [5]
[7]     97.2    0.00    6.34     101         GBC <cycle 4> [7]
                0.00    3.36     101/101         mark_phase [9]
                2.98    0.00     101/101         sweep_phase [10]
                0.00    0.00     202/202         runtime [54]
                0.00    0.00     101/1434        symbol_value [42]
                                  89             alloc_page <cycle 4> [41]
-----------------------------------------------
[8]     51.5    3.36    0.00  712555+151345782 <cycle 3 as a whole> [8]
                1.96    0.00 151663730+2313304     mark_object <cycle 3> [15]
-----------------------------------------------
                0.00    3.36     101/101         GBC <cycle 4> [7]
[9]     51.5    0.00    3.36     101         mark_phase [9]
                2.38    0.00  505707/712555      mark_object <cycle 3> [15]
                0.96    0.00  204626/712555      mark_cons <cycle 3> [16]
                0.00    0.01     202/303         mark_stack_carefully [18]
                0.00    0.00     101/101         mark_c_stack [19]
                0.00    0.00     101/101         clear_stack [62]
-----------------------------------------------
                2.98    0.00     101/101         GBC <cycle 4> [7]
[10]    45.7    2.98    0.00     101         sweep_phase [10]
-----------------------------------------------
                0.00    2.17       6/6           LI1 [2]
[11]    33.3    0.00    2.17       6         simple_symlispcall [11]
                0.00    2.17       3/3           Lread [14]
                0.00    0.00       6/9           symbol_function [156]
                0.00    0.00       3/3           Lprin1 [177]
-----------------------------------------------
                0.00    2.17       3/3           Lformat [13]
[12]    33.3    0.00    2.17       3         
Iinvoke_c_function_from_value_stack [12]
                0.00    2.17       3/9           c_apply_n <cycle 1> [48]
-----------------------------------------------
                0.00    2.17       3/3           LI1 [2]
[13]    33.3    0.00    2.17       3         Lformat [13]
                0.00    2.17       3/3           
Iinvoke_c_function_from_value_stack [12]
-----------------------------------------------
                0.00    2.17       3/3           simple_symlispcall [11]
[14]    33.3    0.00    2.17       3         Lread [14]
                0.00    2.17       3/9           read_object_non_recursive 
<cycle 1> [154]
                0.00    0.00       3/7           check_type_stream [163]
-----------------------------------------------
                             2313304             mark_object <cycle 3> [15]
                             151156609             mark_cons <cycle 3> [16]
                0.01    0.00    1414/712555      mark_stack_carefully [18]
                2.38    0.00  505707/712555      mark_phase [9]
[15]    30.1    1.96    0.00 151663730+2313304 mark_object <cycle 3> [15]
                0.00    0.00     712/712         copy_relblock [46]
                              189173             mark_cons <cycle 3> [16]
                             2313304             mark_object <cycle 3> [15]
-----------------------------------------------
                              401374             mark_cons <cycle 3> [16]
                              189173             mark_object <cycle 3> [15]
                0.00    0.00     808/712555      mark_stack_carefully [18]
                0.96    0.00  204626/712555      mark_phase [9]
[16]    21.5    1.40    0.00  394607+401374  mark_cons <cycle 3> [16]
                             151156609             mark_object <cycle 3> [15]
                              401374             mark_cons <cycle 3> [16]
-----------------------------------------------
                0.10    0.00    8762/8762        make_cons [5]
[17]     1.5    0.10    0.00    8762         add_page_to_freelist [17]
-----------------------------------------------
                0.00    0.00     101/303         mark_c_stack [19]
                0.00    0.01     202/303         mark_phase [9]
[18]     0.2    0.00    0.01     303         mark_stack_carefully [18]
                0.01    0.00    1414/712555      mark_object <cycle 3> [15]
                0.00    0.00     808/712555      mark_cons <cycle 3> [16]
-----------------------------------------------
                                 202             mark_c_stack [19]
                0.00    0.00     101/101         mark_phase [9]
[19]     0.1    0.00    0.00     101+202     mark_c_stack [19]
                0.00    0.00     101/303         mark_stack_carefully [18]
                                 202             mark_c_stack [19]
-----------------------------------------------
                0.00    0.00       1/218         lambda_bind <cycle 1> [37]
                0.00    0.00       1/218         Fdolist <cycle 1> [31]
                0.00    0.00     216/218         let_bind <cycle 1> [21]
[20]     0.0    0.00    0.00     218         bind_var [20]
                0.00    0.00     654/3000968     make_cons [5]
-----------------------------------------------
                                   1             Fdo <cycle 1> [34]
                                  52             Flet <cycle 1> [85]
[21]     0.0    0.00    0.00      53         let_bind <cycle 1> [21]
                0.00    0.00     216/218         bind_var [20]
                0.00    0.00      53/54          find_special [81]
                                 216             eval <cycle 1> [3]
-----------------------------------------------
                                   2             eval <cycle 1> [3]
[22]     0.0    0.00    0.00       2         Fmultiple_value_list <cycle 1> [22]
                0.00    0.00     157/3000968     make_cons [5]
                                   2             eval <cycle 1> [3]
-----------------------------------------------
                                  29             funcall <cycle 1> [27]
[23]     0.0    0.00    0.00      29         Lleft_parenthesis_reader <cycle 1> 
[23]
                0.00    0.00      77/3000968     make_cons [5]
                                 106             read_object <cycle 1> [35]
-----------------------------------------------
                0.00    0.00       8/8           eval <cycle 1> [3]
[24]     0.0    0.00    0.00       8         Lappend [24]
                0.00    0.00       8/8           append [25]
-----------------------------------------------
                0.00    0.00       8/8           Lappend [24]
[25]     0.0    0.00    0.00       8         append [25]
                0.00    0.00      32/3000968     make_cons [5]
-----------------------------------------------
                                  14             eval <cycle 1> [3]
[26]     0.0    0.00    0.00      14         Fpush <cycle 1> [26]
                0.00    0.00      14/3000968     make_cons [5]
                0.00    0.00      14/36          setq [99]
                                  28             eval <cycle 1> [3]
-----------------------------------------------
                                   1             ifuncall2 <cycle 1> [233]
                                   2             IapplyVector <cycle 1> [49]
                                  34             read_object <cycle 1> [35]
                                 276             eval <cycle 1> [3]
                0.00    2.17       3/9           LI1 [2]
[27]     0.0    0.00    0.00     316         funcall <cycle 1> [27]
                0.00    0.00       8/3000968     make_cons [5]
                0.00    0.00       1/1           L1 [32]
                0.00    0.00       4/4           Ldouble_quote_reader [170]
                0.00    0.00       2/57          bds_unwind [76]
                0.00    0.00       2/251         alloc_object [52]
                0.00    0.00       2/2           kar [198]
                0.00    0.00       1/1           quick_call_sfun [240]
                                 278             IapplyVector <cycle 1> [49]
                                  29             Lleft_parenthesis_reader 
<cycle 1> [23]
                                   2             lambda_bind <cycle 1> [37]
                                   2             eval <cycle 1> [3]
                                   1             Lsingle_quote_reader <cycle 1> 
[211]
-----------------------------------------------
                0.00    0.00       1/2           Fdo <cycle 1> [34]
                0.00    0.00       1/2           Fdolist <cycle 1> [31]
[28]     0.0    0.00    0.00       2         lex_block_bind [28]
                0.00    0.00       8/3000968     make_cons [5]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[29]     0.0    0.00    0.00       1         Lreverse [29]
                0.00    0.00       1/1           reverse [30]
-----------------------------------------------
                0.00    0.00       1/1           Lreverse [29]
[30]     0.0    0.00    0.00       1         reverse [30]
                0.00    0.00       8/3000968     make_cons [5]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
[31]     0.0    0.00    0.00       1         Fdolist <cycle 1> [31]
                0.00    0.00       1/2           lex_block_bind [28]
                0.00    0.00       1/218         bind_var [20]
                0.00    0.00       1/251         alloc_object [52]
                0.00    0.00       1/57          bds_unwind [76]
                0.00    0.00       1/54          find_special [81]
                0.00    0.00       1/49          assoc_eq [88]
                                   8             Ftagbody <cycle 1> [96]
                                   2             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00       1/1           funcall <cycle 1> [27]
[32]     0.0    0.00    0.00       1         L1 [32]
                0.00    0.00       1/1           listA [33]
                0.00    0.00       2/3           list [182]
-----------------------------------------------
                0.00    0.00       1/1           L1 [32]
[33]     0.0    0.00    0.00       1         listA [33]
                0.00    0.00       5/3000968     make_cons [5]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
[34]     0.0    0.00    0.00       1         Fdo <cycle 1> [34]
                0.00    0.00       1/2           lex_block_bind [28]
                0.00    0.00       3/49          assoc_eq [88]
                0.00    0.00       1/251         alloc_object [52]
                0.00    0.00       1/57          bds_unwind [76]
                0.00    0.00       1/1           do_var_list [225]
                                 118             eval <cycle 1> [3]
                                  29             Ftagbody <cycle 1> [96]
                                   1             let_bind <cycle 1> [21]
-----------------------------------------------
                                   1             Lsingle_quote_reader <cycle 1> 
[211]
                                   9             read_object_non_recursive 
<cycle 1> [154]
                                 106             Lleft_parenthesis_reader 
<cycle 1> [23]
[35]     0.0    0.00    0.00     116         read_object <cycle 1> [35]
                0.00    0.00      42/42          intern [36]
                0.00    0.00      37/40          current_package [95]
                0.00    0.00      35/35          stream_at_end [105]
                0.00    0.00      35/137         readc_stream [59]
                0.00    0.00      34/35          super_funcall [106]
                0.00    0.00      21/56          rl_ungetc_em [79]
                0.00    0.00      21/21          unreadc_stream [128]
                0.00    0.00      21/21          unread_char [127]
                0.00    0.00      15/15          parse_number [133]
                0.00    0.00       5/8           find_package [160]
                                  34             funcall <cycle 1> [27]
-----------------------------------------------
                0.00    0.00      42/42          read_object <cycle 1> [35]
[36]     0.0    0.00    0.00      42         intern [36]
                0.00    0.00       3/3000968     make_cons [5]
                0.00    0.00      42/45          pack_hash [92]
                0.00    0.00       3/3           make_symbol [186]
-----------------------------------------------
                                   2             funcall <cycle 1> [27]
[37]     0.0    0.00    0.00       2         lambda_bind <cycle 1> [37]
                0.00    0.00       1/218         bind_var [20]
                0.00    0.00       2/57          macro_expand [77]
                                   1             eval <cycle 1> [3]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
[38]     0.0    0.00    0.00       1         Fdefun <cycle 1> [38]
                0.00    0.00       1/3000968     make_cons [5]
                0.00    0.00       1/57          macro_expand [77]
                                   1             clear_compiler_properties 
<cycle 1> [220]
-----------------------------------------------
                                                 <spontaneous>
[39]     0.0    0.00    0.00                 malloc [39]
                0.00    0.00       1/3000968     make_cons [5]
                0.00    0.00       1/1           alloc_simple_string [215]
                0.00    0.00       1/14          alloc_contblock [135]
                0.00    0.00       1/2           perm_writable [201]
-----------------------------------------------
[40]     0.0    0.00    0.00      23+50      <cycle 2 as a whole> [40]
                0.00    0.00      55             format <cycle 2> [80]
                0.00    0.00       8             fmt_iteration <cycle 2> [161]
-----------------------------------------------
                                  89             GBC <cycle 4> [7]
                0.00    6.33    8762/8774        make_cons [5]
[41]     0.0    0.00    0.00    8851         alloc_page <cycle 4> [41]
                                  89             GBC <cycle 4> [7]
-----------------------------------------------
                0.00    0.00       2/1434        unreadc_stream [128]
                0.00    0.00       3/1434        Lfresh_line [171]
                0.00    0.00       3/1434        prin1 [189]
                0.00    0.00       3/1434        Lload <cycle 1> [209]
                0.00    0.00       3/1434        LI19 [206]
                0.00    0.00       4/1434        coerce_stream [173]
                0.00    0.00       6/1434        princ_char [190]
                0.00    0.00       9/1434        current_readtable [153]
                0.00    0.00      10/1434        terpri [152]
                0.00    0.00      27/1434        setup_READ [155]
                0.00    0.00      35/1434        stream_at_end [105]
                0.00    0.00      40/1434        current_package [95]
                0.00    0.00      41/1434        flush_stream [60]
                0.00    0.00      45/1434        fLformat [122]
                0.00    0.00      47/1434        readc_stream [59]
                0.00    0.00      58/1434        princ [108]
                0.00    0.00      70/1434        setupPRINTdefault [168]
                0.00    0.00      88/1434        file_column [68]
                0.00    0.00     101/1434        GBC <cycle 4> [7]
                0.00    0.00     839/1434        writec_stream [43]
[42]     0.0    0.00    0.00    1434         symbol_value [42]
-----------------------------------------------
                0.00    0.00       3/918         Lfresh_line [171]
                0.00    0.00       3/918         princ_char [190]
                0.00    0.00       9/918         fmt_fix_float [136]
                0.00    0.00      10/918         terpri [152]
                0.00    0.00      14/918         fmt_percent [137]
                0.00    0.00      57/918         flush_queue [167]
                0.00    0.00      61/918         writestr_stream [138]
                0.00    0.00      88/918         fmt_tabulate [123]
                0.00    0.00     101/918         fmt_integer [110]
                0.00    0.00     275/918         writec_PRINTstream [51]
                0.00    0.00     297/918         format <cycle 2> [80]
[43]     0.0    0.00    0.00     918         writec_stream [43]
                0.00    0.00     842/842         rl_putc_em [44]
                0.00    0.00     839/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00     842/842         writec_stream [43]
[44]     0.0    0.00    0.00     842         rl_putc_em [44]
-----------------------------------------------
                0.00    0.00     106/835         fmt_skip [130]
                0.00    0.00     729/835         format <cycle 2> [80]
[45]     0.0    0.00    0.00     835         ctl_advance [45]
-----------------------------------------------
                0.00    0.00     712/712         mark_object <cycle 3> [15]
[46]     0.0    0.00    0.00     712         copy_relblock [46]
-----------------------------------------------
                0.00    0.00       8/387         fmt_iteration <cycle 2> [161]
                0.00    0.00      14/387         fmt_percent [137]
                0.00    0.00      46/387         fmt_tabulate [123]
                0.00    0.00      93/387         fmt_decimal [109]
                0.00    0.00      98/387         fmt_fix_float [136]
                0.00    0.00     128/387         fmt_ascii [107]
[47]     0.0    0.00    0.00     387         fmt_set_param [47]
-----------------------------------------------
                                 286             IapplyVector <cycle 1> [49]
                0.00    2.17       3/9           
Iinvoke_c_function_from_value_stack [12]
[48]     0.0    0.00    0.00     289         c_apply_n <cycle 1> [48]
                0.00    0.00     220/220         fLnth [53]
                0.00    0.00      30/30          fLnull [112]
                0.00    0.00      23/23          fLformat [122]
                0.00    0.00       3/25          Ivs_values [120]
                0.00    0.00       2/2           fLget_internal_real_time [196]
                0.00    0.00       1/1           fSgprof_quit [228]
                0.00    0.00       1/1           fSallocate_growth [227]
                                   8             fLapply <cycle 1> [159]
                                   3             fLeval <cycle 1> [179]
                                   1             fLfuncall <cycle 1> [226]
-----------------------------------------------
                                   1             Ifuncall_n <cycle 1> [204]
                                   1             fLfuncall <cycle 1> [226]
                                   8             fLapply <cycle 1> [159]
                                 278             funcall <cycle 1> [27]
[49]     0.0    0.00    0.00     288         IapplyVector <cycle 1> [49]
                                 286             c_apply_n <cycle 1> [48]
                                   2             funcall <cycle 1> [27]
-----------------------------------------------
                0.00    0.00     276/276         eval <cycle 1> [3]
[50]     0.0    0.00    0.00     276         funcall_no_event [50]
-----------------------------------------------
                0.00    0.00     275/275         write_object [73]
[51]     0.0    0.00    0.00     275         writec_PRINTstream [51]
                0.00    0.00     275/918         writec_stream [43]
-----------------------------------------------
                0.00    0.00       1/251         alloc_simple_string [215]
                0.00    0.00       1/251         open_stream [238]
                0.00    0.00       1/251         Fdo <cycle 1> [34]
                0.00    0.00       1/251         Fdolist <cycle 1> [31]
                0.00    0.00       1/251         Lcons [208]
                0.00    0.00       1/251         number_times [236]
                0.00    0.00       2/251         make_shortfloat [200]
                0.00    0.00       2/251         make_pathname [199]
                0.00    0.00       2/251         funcall <cycle 1> [27]
                0.00    0.00       3/251         make_ratio [185]
                0.00    0.00       3/251         make_longfloat [183]
                0.00    0.00       3/251         make_symbol [186]
                0.00    0.00       8/251         copy_simple_string [158]
                0.00    0.00      12/251         new_bignum [141]
                0.00    0.00      20/251         number_divide [124]
                0.00    0.00      37/251         Ftagbody <cycle 1> [96]
                0.00    0.00      69/251         make_fixnum1 [72]
                0.00    0.00      84/251         stack_cons [69]
[52]     0.0    0.00    0.00     251         alloc_object [52]
-----------------------------------------------
                0.00    0.00     220/220         c_apply_n <cycle 1> [48]
[53]     0.0    0.00    0.00     220         fLnth [53]
-----------------------------------------------
                0.00    0.00     202/202         GBC <cycle 4> [7]
[54]     0.0    0.00    0.00     202         runtime [54]
-----------------------------------------------
                0.00    0.00      35/172         stream_at_end [105]
                0.00    0.00     137/172         readc_stream [59]
[55]     0.0    0.00    0.00     172         rl_getc_em [55]
-----------------------------------------------
                0.00    0.00       1/165         Lone_plus [210]
                0.00    0.00       2/165         Ltimes [212]
                0.00    0.00       6/165         Lminus [176]
                0.00    0.00      18/165         Lzerop [129]
                0.00    0.00      37/165         Ldivide [134]
                0.00    0.00     101/165         Lplus [89]
[56]     0.0    0.00    0.00     165         check_type_number [56]
-----------------------------------------------
                0.00    0.00       1/152         fmt_newline [230]
                0.00    0.00       8/152         fmt_iteration <cycle 2> [161]
                0.00    0.00      14/152         fmt_fix_float [136]
                0.00    0.00      14/152         fmt_percent [137]
                0.00    0.00      23/152         fmt_tabulate [123]
                0.00    0.00      29/152         fmt_up_and_out [116]
                0.00    0.00      31/152         fmt_decimal [109]
                0.00    0.00      32/152         fmt_ascii [107]
[57]     0.0    0.00    0.00     152         fmt_max_param [57]
-----------------------------------------------
                0.00    0.00     138/138         fmt_integer [110]
[58]     0.0    0.00    0.00     138         fmt_tempstr [58]
-----------------------------------------------
                0.00    0.00      35/137         read_object <cycle 1> [35]
                0.00    0.00     102/137         read_string [174]
[59]     0.0    0.00    0.00     137         readc_stream [59]
                0.00    0.00     137/172         rl_getc_em [55]
                0.00    0.00      47/1434        symbol_value [42]
                0.00    0.00      47/126         flush_stream [60]
-----------------------------------------------
                0.00    0.00       2/126         Lload <cycle 1> [209]
                0.00    0.00       3/126         Lfresh_line [171]
                0.00    0.00       3/126         prin1 [189]
                0.00    0.00       3/126         princ_char [190]
                0.00    0.00      10/126         terpri [152]
                0.00    0.00      23/126         fLformat [122]
                0.00    0.00      35/126         stream_at_end [105]
                0.00    0.00      47/126         readc_stream [59]
[60]     0.0    0.00    0.00     126         flush_stream [60]
                0.00    0.00      41/1434        symbol_value [42]
-----------------------------------------------
                                 105             eval <cycle 1> [3]
[61]     0.0    0.00    0.00     105         Fif <cycle 1> [61]
                                 105             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00     101/101         mark_phase [9]
[62]     0.0    0.00    0.00     101         clear_stack [62]
-----------------------------------------------
                0.00    0.00      99/99          Lassoc_or_rassoc [101]
[63]     0.0    0.00    0.00      99         car [63]
-----------------------------------------------
                0.00    0.00      99/99          test_eql [66]
[64]     0.0    0.00    0.00      99         eql [64]
-----------------------------------------------
                0.00    0.00      99/99          test_eql [66]
[65]     0.0    0.00    0.00      99         identity [65]
-----------------------------------------------
                0.00    0.00      99/99          Lassoc_or_rassoc [101]
[66]     0.0    0.00    0.00      99         test_eql [66]
                0.00    0.00      99/99          identity [65]
                0.00    0.00      99/99          eql [64]
-----------------------------------------------
                0.00    0.00       8/95          fmt_iteration <cycle 2> [161]
                0.00    0.00      10/95          fmt_conditional <cycle 2> [151]
                0.00    0.00      14/95          fmt_fix_float [136]
                0.00    0.00      31/95          fmt_decimal [109]
                0.00    0.00      32/95          fmt_ascii [107]
[67]     0.0    0.00    0.00      95         fmt_advance [67]
-----------------------------------------------
                0.00    0.00       2/92          Lload <cycle 1> [209]
                0.00    0.00       4/92          Lfresh_line [171]
                0.00    0.00      23/92          fmt_tabulate [123]
                0.00    0.00      31/92          fmt_integer [110]
                0.00    0.00      32/92          fmt_ascii [107]
[68]     0.0    0.00    0.00      92         file_column [68]
                0.00    0.00      88/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       2/84          parse_namestring [239]
                0.00    0.00       2/84          Lsingle_quote_reader <cycle 1> 
[211]
                0.00    0.00      80/84          Llist [94]
[69]     0.0    0.00    0.00      84         stack_cons [69]
                0.00    0.00      84/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00      16/78          member_string_equal [75]
                0.00    0.00      62/78          designate_package [74]
[70]     0.0    0.00    0.00      78         string_equal [70]
-----------------------------------------------
                0.00    0.00      76/76          write_object [73]
[71]     0.0    0.00    0.00      76         digit_weight [71]
-----------------------------------------------
                0.00    0.00       2/69          siLgbc_time [192]
                0.00    0.00       3/69          Lget_internal_run_time [172]
                0.00    0.00       3/69          normalize_big [142]
                0.00    0.00       3/69          maybe_replace_big [148]
                0.00    0.00      13/69          siLroom_report [242]
                0.00    0.00      45/69          fixnum_add [83]
[72]     0.0    0.00    0.00      69         make_fixnum1 [72]
                0.00    0.00      69/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       2/68          Lload <cycle 1> [209]
                0.00    0.00       3/68          prin1 [189]
                0.00    0.00      31/68          fmt_integer [110]
                0.00    0.00      32/68          princ [108]
[73]     0.0    0.00    0.00      68         write_object [73]
                0.00    0.00     275/275         writec_PRINTstream [51]
                0.00    0.00      76/76          digit_weight [71]
                0.00    0.00      29/57          writec_queue [78]
                0.00    0.00       3/3           potential_number_p [188]
                0.00    0.00       3/40          current_package [95]
                0.00    0.00       3/3           find_symbol [180]
-----------------------------------------------
                0.00    0.00      62/62          find_package [160]
[74]     0.0    0.00    0.00      62         designate_package [74]
                0.00    0.00      62/78          string_equal [70]
                0.00    0.00      59/59          member_string_equal [75]
-----------------------------------------------
                0.00    0.00      59/59          designate_package [74]
[75]     0.0    0.00    0.00      59         member_string_equal [75]
                0.00    0.00      16/78          string_equal [70]
-----------------------------------------------
                0.00    0.00       1/57          Lload <cycle 1> [209]
                0.00    0.00       1/57          Fdo <cycle 1> [34]
                0.00    0.00       1/57          Fdolist <cycle 1> [31]
                0.00    0.00       2/57          funcall <cycle 1> [27]
                0.00    0.00      52/57          eval <cycle 1> [3]
[76]     0.0    0.00    0.00      57         bds_unwind [76]
-----------------------------------------------
                0.00    0.00       1/57          Fdefun <cycle 1> [38]
                0.00    0.00       2/57          lambda_bind <cycle 1> [37]
                0.00    0.00      54/57          find_special [81]
[77]     0.0    0.00    0.00      57         macro_expand [77]
                0.00    0.00       1/49          assoc_eq [88]
-----------------------------------------------
                0.00    0.00      28/57          write_str [169]
                0.00    0.00      29/57          write_object [73]
[78]     0.0    0.00    0.00      57         writec_queue [78]
-----------------------------------------------
                0.00    0.00      21/56          read_object <cycle 1> [35]
                0.00    0.00      35/56          stream_at_end [105]
[79]     0.0    0.00    0.00      56         rl_ungetc_em [79]
-----------------------------------------------
                                   3             fmt_conditional <cycle 2> [151]
                                  29             fmt_iteration <cycle 2> [161]
                0.00    0.00      23/23          fLformat [122]
[80]     0.0    0.00    0.00      55         format <cycle 2> [80]
                0.00    0.00     729/835         ctl_advance [45]
                0.00    0.00     297/918         writec_stream [43]
                0.00    0.00      32/32          fmt_ascii [107]
                0.00    0.00      31/31          fmt_decimal [109]
                0.00    0.00      29/29          fmt_up_and_out [116]
                0.00    0.00      23/23          fmt_tabulate [123]
                0.00    0.00      14/14          fmt_percent [137]
                0.00    0.00      14/14          fmt_fix_float [136]
                0.00    0.00       1/1           fmt_newline [230]
                                  10             fmt_conditional <cycle 2> [151]
                                   8             fmt_iteration <cycle 2> [161]
-----------------------------------------------
                0.00    0.00       1/54          Fdolist <cycle 1> [31]
                0.00    0.00      53/54          let_bind <cycle 1> [21]
[81]     0.0    0.00    0.00      54         find_special [81]
                0.00    0.00      54/57          macro_expand [77]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
                                  52             Flet <cycle 1> [85]
[82]     0.0    0.00    0.00      53         Fprogn <cycle 1> [82]
                                  78             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00      53/53          number_plus [84]
[83]     0.0    0.00    0.00      53         fixnum_add [83]
                0.00    0.00      45/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00      53/53          Lplus [89]
[84]     0.0    0.00    0.00      53         number_plus [84]
                0.00    0.00      53/53          fixnum_add [83]
-----------------------------------------------
                                  52             eval <cycle 1> [3]
[85]     0.0    0.00    0.00      52         Flet <cycle 1> [85]
                0.00    0.00      52/52          let_var_list [86]
                                  52             let_bind <cycle 1> [21]
                                  52             Fprogn <cycle 1> [82]
-----------------------------------------------
                0.00    0.00      52/52          Flet <cycle 1> [85]
[86]     0.0    0.00    0.00      52         let_var_list [86]
-----------------------------------------------
                0.00    0.00      14/51          fmt_fix_float [136]
                0.00    0.00      14/51          fmt_percent [137]
                0.00    0.00      23/51          fmt_tabulate [123]
[87]     0.0    0.00    0.00      51         fmt_not_colon [87]
-----------------------------------------------
                0.00    0.00       1/49          Fdolist <cycle 1> [31]
                0.00    0.00       1/49          macro_expand [77]
                0.00    0.00       3/49          Fdo <cycle 1> [34]
                0.00    0.00       8/49          Ffunction [157]
                0.00    0.00      36/49          setq [99]
[88]     0.0    0.00    0.00      49         assoc_eq [88]
-----------------------------------------------
                0.00    0.00      48/48          eval <cycle 1> [3]
[89]     0.0    0.00    0.00      48         Lplus [89]
                0.00    0.00     101/165         check_type_number [56]
                0.00    0.00      53/53          number_plus [84]
-----------------------------------------------
                0.00    0.00      45/45          eval <cycle 1> [3]
[90]     0.0    0.00    0.00      45         Lcar [90]
-----------------------------------------------
                0.00    0.00       3/45          potential_number_p [188]
                0.00    0.00      42/45          parse_number [133]
[91]     0.0    0.00    0.00      45         digitp [91]
-----------------------------------------------
                0.00    0.00       3/45          find_symbol [180]
                0.00    0.00      42/45          intern [36]
[92]     0.0    0.00    0.00      45         pack_hash [92]
-----------------------------------------------
                0.00    0.00      14/43          fmt_percent [137]
                0.00    0.00      29/43          fmt_up_and_out [116]
[93]     0.0    0.00    0.00      43         fmt_not_atsign [93]
-----------------------------------------------
                0.00    0.00       3/42          LI1 [2]
                0.00    0.00      39/42          eval <cycle 1> [3]
[94]     0.0    0.00    0.00      42         Llist [94]
                0.00    0.00      80/84          stack_cons [69]
-----------------------------------------------
                0.00    0.00       3/40          write_object [73]
                0.00    0.00      37/40          read_object <cycle 1> [35]
[95]     0.0    0.00    0.00      40         current_package [95]
                0.00    0.00      40/1434        symbol_value [42]
-----------------------------------------------
                                   8             Fdolist <cycle 1> [31]
                                  29             Fdo <cycle 1> [34]
[96]     0.0    0.00    0.00      37         Ftagbody <cycle 1> [96]
                0.00    0.00      37/251         alloc_object [52]
                                  45             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00      37/37          eval <cycle 1> [3]
[97]     0.0    0.00    0.00      37         Lcdr [97]
-----------------------------------------------
                0.00    0.00       1/37          Lload <cycle 1> [209]
                0.00    0.00       1/37          Lmake_list [4]
                0.00    0.00      35/37          Lassoc_or_rassoc [101]
[98]     0.0    0.00    0.00      37         parse_key [98]
-----------------------------------------------
                0.00    0.00      14/36          Fpush <cycle 1> [26]
                0.00    0.00      22/36          Fsetq <cycle 1> [144]
[99]     0.0    0.00    0.00      36         setq [99]
                0.00    0.00      36/49          assoc_eq [88]
-----------------------------------------------
                0.00    0.00      35/35          eval <cycle 1> [3]
[100]    0.0    0.00    0.00      35         Lassoc [100]
-----------------------------------------------
                0.00    0.00      35/35          eval <cycle 1> [3]
[101]    0.0    0.00    0.00      35         Lassoc_or_rassoc [101]
                0.00    0.00      99/99          car [63]
                0.00    0.00      99/99          test_eql [66]
                0.00    0.00      35/37          parse_key [98]
                0.00    0.00      35/35          setupTEST [104]
-----------------------------------------------
                0.00    0.00      35/35          stream_at_end [105]
[102]    0.0    0.00    0.00      35         check_stream [102]
-----------------------------------------------
                0.00    0.00      35/35          stream_at_end [105]
[103]    0.0    0.00    0.00      35         feof1 [103]
-----------------------------------------------
                0.00    0.00      35/35          Lassoc_or_rassoc [101]
[104]    0.0    0.00    0.00      35         setupTEST [104]
-----------------------------------------------
                0.00    0.00      35/35          read_object <cycle 1> [35]
[105]    0.0    0.00    0.00      35         stream_at_end [105]
                0.00    0.00      35/172         rl_getc_em [55]
                0.00    0.00      35/35          feof1 [103]
                0.00    0.00      35/56          rl_ungetc_em [79]
                0.00    0.00      35/1434        symbol_value [42]
                0.00    0.00      35/35          check_stream [102]
                0.00    0.00      35/126         flush_stream [60]
-----------------------------------------------
                0.00    0.00       1/35          ifuncall2 <cycle 1> [233]
                0.00    0.00      34/35          read_object <cycle 1> [35]
[106]    0.0    0.00    0.00      35         super_funcall [106]
-----------------------------------------------
                0.00    0.00      32/32          format <cycle 2> [80]
[107]    0.0    0.00    0.00      32         fmt_ascii [107]
                0.00    0.00     128/387         fmt_set_param [47]
                0.00    0.00      32/152         fmt_max_param [57]
                0.00    0.00      32/92          file_column [68]
                0.00    0.00      32/95          fmt_advance [67]
                0.00    0.00      32/32          princ [108]
-----------------------------------------------
                0.00    0.00      32/32          fmt_ascii [107]
[108]    0.0    0.00    0.00      32         princ [108]
                0.00    0.00      58/1434        symbol_value [42]
                0.00    0.00      32/68          write_object [73]
-----------------------------------------------
                0.00    0.00      31/31          format <cycle 2> [80]
[109]    0.0    0.00    0.00      31         fmt_decimal [109]
                0.00    0.00      93/387         fmt_set_param [47]
                0.00    0.00      31/152         fmt_max_param [57]
                0.00    0.00      31/95          fmt_advance [67]
                0.00    0.00      31/31          fmt_integer [110]
-----------------------------------------------
                0.00    0.00      31/31          fmt_decimal [109]
[110]    0.0    0.00    0.00      31         fmt_integer [110]
                0.00    0.00     138/138         fmt_tempstr [58]
                0.00    0.00     101/918         writec_stream [43]
                0.00    0.00      31/92          file_column [68]
                0.00    0.00      31/68          write_object [73]
-----------------------------------------------
                0.00    0.00      30/30          eval <cycle 1> [3]
[111]    0.0    0.00    0.00      30         Lnthcdr [111]
                0.00    0.00      30/30          fixint [113]
                0.00    0.00      30/30          nthcdr [114]
-----------------------------------------------
                0.00    0.00      30/30          c_apply_n <cycle 1> [48]
[112]    0.0    0.00    0.00      30         fLnull [112]
-----------------------------------------------
                0.00    0.00      30/30          Lnthcdr [111]
[113]    0.0    0.00    0.00      30         fixint [113]
-----------------------------------------------
                0.00    0.00      30/30          Lnthcdr [111]
[114]    0.0    0.00    0.00      30         nthcdr [114]
-----------------------------------------------
                0.00    0.00      30/30          parse_number [133]
[115]    0.0    0.00    0.00      30         zero_big [115]
-----------------------------------------------
                0.00    0.00      29/29          format <cycle 2> [80]
[116]    0.0    0.00    0.00      29         fmt_up_and_out [116]
                0.00    0.00      29/152         fmt_max_param [57]
                0.00    0.00      29/43          fmt_not_atsign [93]
-----------------------------------------------
                                   6             number_to_double [117]
                0.00    0.00       1/28          number_times [236]
                0.00    0.00      11/28          number_divide [124]
                0.00    0.00      16/28          fmt_fix_float [136]
[117]    0.0    0.00    0.00      28+6       number_to_double [117]
                                   6             number_to_double [117]
-----------------------------------------------
                0.00    0.00      27/27          fmt_fix_float [136]
[118]    0.0    0.00    0.00      27         edit_double [118]
-----------------------------------------------
                0.00    0.00       3/27          number_divide [124]
                0.00    0.00       6/27          make_ratio [185]
                0.00    0.00      18/27          Lzerop [129]
[119]    0.0    0.00    0.00      27         number_zerop [119]
-----------------------------------------------
                0.00    0.00       3/25          c_apply_n <cycle 1> [48]
                0.00    0.00      22/25          Fsetq <cycle 1> [144]
[120]    0.0    0.00    0.00      25         Ivs_values [120]
-----------------------------------------------
                0.00    0.00      23/23          fLformat [122]
[121]    0.0    0.00    0.00      23         check_type_string [121]
-----------------------------------------------
                0.00    0.00      23/23          c_apply_n <cycle 1> [48]
[122]    0.0    0.00    0.00      23         fLformat [122]
                0.00    0.00      45/1434        symbol_value [42]
                0.00    0.00      23/23          check_type_string [121]
                0.00    0.00      23/23          format <cycle 2> [80]
                0.00    0.00      23/126         flush_stream [60]
                0.00    0.00       1/7           check_type_stream [163]
-----------------------------------------------
                0.00    0.00      23/23          format <cycle 2> [80]
[123]    0.0    0.00    0.00      23         fmt_tabulate [123]
                0.00    0.00      88/918         writec_stream [43]
                0.00    0.00      46/387         fmt_set_param [47]
                0.00    0.00      23/152         fmt_max_param [57]
                0.00    0.00      23/51          fmt_not_colon [87]
                0.00    0.00      23/92          file_column [68]
-----------------------------------------------
                0.00    0.00      23/23          Ldivide [134]
[124]    0.0    0.00    0.00      23         number_divide [124]
                0.00    0.00      20/251         alloc_object [52]
                0.00    0.00      11/28          number_to_double [117]
                0.00    0.00       3/27          number_zerop [119]
                0.00    0.00       3/12          number_minusp [143]
                0.00    0.00       3/3           make_ratio [185]
-----------------------------------------------
                                  22             Fsetq <cycle 1> [144]
[125]    0.0    0.00    0.00      22         Ieval <cycle 1> [125]
                                  22             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00      22/22          parse_number [133]
[126]    0.0    0.00    0.00      22         verify_big_or_zero [126]
-----------------------------------------------
                0.00    0.00      21/21          read_object <cycle 1> [35]
[127]    0.0    0.00    0.00      21         unread_char [127]
-----------------------------------------------
                0.00    0.00      21/21          read_object <cycle 1> [35]
[128]    0.0    0.00    0.00      21         unreadc_stream [128]
                0.00    0.00       2/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00      18/18          eval <cycle 1> [3]
[129]    0.0    0.00    0.00      18         Lzerop [129]
                0.00    0.00      18/165         check_type_number [56]
                0.00    0.00      18/27          number_zerop [119]
-----------------------------------------------
                0.00    0.00       8/18          fmt_iteration <cycle 2> [161]
                0.00    0.00      10/18          fmt_conditional <cycle 2> [151]
[130]    0.0    0.00    0.00      18         fmt_skip [130]
                0.00    0.00     106/835         ctl_advance [45]
-----------------------------------------------
                0.00    0.00       1/16          free [4150]
                0.00    0.00       1/16          deallocate_stream_buffer [224]
                0.00    0.00      14/16          alloc_contblock [135]
[131]    0.0    0.00    0.00      16         insert_contblock [131]
-----------------------------------------------
                0.00    0.00      15/15          eval <cycle 1> [3]
[132]    0.0    0.00    0.00      15         Lnconc [132]
-----------------------------------------------
                0.00    0.00      15/15          read_object <cycle 1> [35]
[133]    0.0    0.00    0.00      15         parse_number [133]
                0.00    0.00      42/45          digitp [91]
                0.00    0.00      30/30          zero_big [115]
                0.00    0.00      22/22          verify_big_or_zero [126]
                0.00    0.00      11/11          mul_int_big [149]
                0.00    0.00      11/11          add_int_big [145]
                0.00    0.00       8/11          maybe_replace_big [148]
                0.00    0.00       8/8           normalize_big_to_object [162]
                0.00    0.00       3/3           big_to_double [178]
                0.00    0.00       3/3           make_longfloat [183]
-----------------------------------------------
                0.00    0.00      14/14          eval <cycle 1> [3]
[134]    0.0    0.00    0.00      14         Ldivide [134]
                0.00    0.00      37/165         check_type_number [56]
                0.00    0.00      23/23          number_divide [124]
-----------------------------------------------
                0.00    0.00       1/14          malloc [39]
                0.00    0.00       1/14          setup_stream_buffer [241]
                0.00    0.00      12/14          gcl_gmp_alloc [4157]
[135]    0.0    0.00    0.00      14         alloc_contblock [135]
                0.00    0.00      14/16          insert_contblock [131]
-----------------------------------------------
                0.00    0.00      14/14          format <cycle 2> [80]
[136]    0.0    0.00    0.00      14         fmt_fix_float [136]
                0.00    0.00      98/387         fmt_set_param [47]
                0.00    0.00      27/27          edit_double [118]
                0.00    0.00      16/28          number_to_double [117]
                0.00    0.00      14/51          fmt_not_colon [87]
                0.00    0.00      14/152         fmt_max_param [57]
                0.00    0.00      14/95          fmt_advance [67]
                0.00    0.00      14/14          writestr_stream [138]
                0.00    0.00       9/918         writec_stream [43]
                0.00    0.00       2/2           make_shortfloat [200]
-----------------------------------------------
                0.00    0.00      14/14          format <cycle 2> [80]
[137]    0.0    0.00    0.00      14         fmt_percent [137]
                0.00    0.00      14/152         fmt_max_param [57]
                0.00    0.00      14/387         fmt_set_param [47]
                0.00    0.00      14/51          fmt_not_colon [87]
                0.00    0.00      14/43          fmt_not_atsign [93]
                0.00    0.00      14/918         writec_stream [43]
-----------------------------------------------
                0.00    0.00      14/14          fmt_fix_float [136]
[138]    0.0    0.00    0.00      14         writestr_stream [138]
                0.00    0.00      61/918         writec_stream [43]
-----------------------------------------------
                0.00    0.00      12/12          make_cons [5]
[139]    0.0    0.00    0.00      12         call_after_gbc_hook [139]
-----------------------------------------------
                0.00    0.00      12/12          make_cons [5]
[140]    0.0    0.00    0.00      12         grow_linear [140]
-----------------------------------------------
                0.00    0.00      12/12          integer_quotient_remainder_1 
[165]
[141]    0.0    0.00    0.00      12         new_bignum [141]
                0.00    0.00      12/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00      12/12          integer_quotient_remainder_1 
[165]
[142]    0.0    0.00    0.00      12         normalize_big [142]
                0.00    0.00       3/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00       3/12          make_ratio [185]
                0.00    0.00       3/12          number_divide [124]
                0.00    0.00       6/12          get_gcd [181]
[143]    0.0    0.00    0.00      12         number_minusp [143]
-----------------------------------------------
                                  11             eval <cycle 1> [3]
[144]    0.0    0.00    0.00      11         Fsetq <cycle 1> [144]
                0.00    0.00      22/25          Ivs_values [120]
                0.00    0.00      22/36          setq [99]
                                  22             Ieval <cycle 1> [125]
-----------------------------------------------
                0.00    0.00      11/11          parse_number [133]
[145]    0.0    0.00    0.00      11         add_int_big [145]
-----------------------------------------------
                0.00    0.00       3/11          make_symbol [186]
                0.00    0.00       8/11          copy_simple_string [158]
[146]    0.0    0.00    0.00      11         alloc_relblock [146]
-----------------------------------------------
                0.00    0.00       1/11          fmt_newline [230]
                0.00    0.00      10/11          fmt_conditional <cycle 2> [151]
[147]    0.0    0.00    0.00      11         fmt_not_colon_atsign [147]
-----------------------------------------------
                0.00    0.00       3/11          number_minus [187]
                0.00    0.00       8/11          parse_number [133]
[148]    0.0    0.00    0.00      11         maybe_replace_big [148]
                0.00    0.00       3/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00      11/11          parse_number [133]
[149]    0.0    0.00    0.00      11         mul_int_big [149]
-----------------------------------------------
                0.00    0.00      10/10          eval <cycle 1> [3]
[150]    0.0    0.00    0.00      10         Lterpri [150]
                0.00    0.00      10/10          terpri [152]
-----------------------------------------------
                                  10             format <cycle 2> [80]
[151]    0.0    0.00    0.00      10         fmt_conditional <cycle 2> [151]
                0.00    0.00      10/11          fmt_not_colon_atsign [147]
                0.00    0.00      10/18          fmt_skip [130]
                0.00    0.00      10/95          fmt_advance [67]
                                   3             format <cycle 2> [80]
-----------------------------------------------
                0.00    0.00      10/10          Lterpri [150]
[152]    0.0    0.00    0.00      10         terpri [152]
                0.00    0.00      10/918         writec_stream [43]
                0.00    0.00      10/126         flush_stream [60]
                0.00    0.00      10/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       9/9           setup_READ [155]
[153]    0.0    0.00    0.00       9         current_readtable [153]
                0.00    0.00       9/1434        symbol_value [42]
-----------------------------------------------
                                   6             Lload <cycle 1> [209]
                0.00    2.17       3/9           Lread [14]
[154]    0.0    0.00    0.00       9         read_object_non_recursive <cycle 
1> [154]
                0.00    0.00       9/9           setup_READ [155]
                                   9             read_object <cycle 1> [35]
-----------------------------------------------
                0.00    0.00       9/9           read_object_non_recursive 
<cycle 1> [154]
[155]    0.0    0.00    0.00       9         setup_READ [155]
                0.00    0.00      27/1434        symbol_value [42]
                0.00    0.00       9/9           current_readtable [153]
-----------------------------------------------
                0.00    0.00       3/9           symlispcall [194]
                0.00    0.00       6/9           simple_symlispcall [11]
[156]    0.0    0.00    0.00       9         symbol_function [156]
-----------------------------------------------
                0.00    0.00       8/8           eval <cycle 1> [3]
[157]    0.0    0.00    0.00       8         Ffunction [157]
                0.00    0.00       8/49          assoc_eq [88]
-----------------------------------------------
                0.00    0.00       1/8           Lload <cycle 1> [209]
                0.00    0.00       3/8           make_one [184]
                0.00    0.00       4/8           Ldouble_quote_reader [170]
[158]    0.0    0.00    0.00       8         copy_simple_string [158]
                0.00    0.00       8/251         alloc_object [52]
                0.00    0.00       8/11          alloc_relblock [146]
-----------------------------------------------
                                   8             c_apply_n <cycle 1> [48]
[159]    0.0    0.00    0.00       8         fLapply <cycle 1> [159]
                                   8             IapplyVector <cycle 1> [49]
-----------------------------------------------
                0.00    0.00       3/8           Lfind_package [175]
                0.00    0.00       5/8           read_object <cycle 1> [35]
[160]    0.0    0.00    0.00       8         find_package [160]
                0.00    0.00      62/62          designate_package [74]
-----------------------------------------------
                                   8             format <cycle 2> [80]
[161]    0.0    0.00    0.00       8         fmt_iteration <cycle 2> [161]
                0.00    0.00       8/152         fmt_max_param [57]
                0.00    0.00       8/387         fmt_set_param [47]
                0.00    0.00       8/18          fmt_skip [130]
                0.00    0.00       8/95          fmt_advance [67]
                                  29             format <cycle 2> [80]
-----------------------------------------------
                0.00    0.00       8/8           parse_number [133]
[162]    0.0    0.00    0.00       8         normalize_big_to_object [162]
-----------------------------------------------
                0.00    0.00       1/7           fLformat [122]
                0.00    0.00       3/7           princ_char [190]
                0.00    0.00       3/7           Lread [14]
[163]    0.0    0.00    0.00       7         check_type_stream [163]
-----------------------------------------------
                0.00    0.00       6/6           make_ratio [185]
[164]    0.0    0.00    0.00       6         integer_divide1 [164]
                0.00    0.00       6/6           integer_quotient_remainder_1 
[165]
-----------------------------------------------
                0.00    0.00       6/6           integer_divide1 [164]
[165]    0.0    0.00    0.00       6         integer_quotient_remainder_1 [165]
                0.00    0.00      12/12          new_bignum [141]
                0.00    0.00      12/12          normalize_big [142]
-----------------------------------------------
                0.00    0.00       2/5           Lload <cycle 1> [209]
                0.00    0.00       3/5           prin1 [189]
[166]    0.0    0.00    0.00       5         cleanupPRINT [166]
                0.00    0.00       5/5           flush_queue [167]
-----------------------------------------------
                0.00    0.00       5/5           cleanupPRINT [166]
[167]    0.0    0.00    0.00       5         flush_queue [167]
                0.00    0.00      57/918         writec_stream [43]
-----------------------------------------------
                0.00    0.00       2/5           Lload <cycle 1> [209]
                0.00    0.00       3/5           prin1 [189]
[168]    0.0    0.00    0.00       5         setupPRINTdefault [168]
                0.00    0.00      70/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       5/5           Lload <cycle 1> [209]
[169]    0.0    0.00    0.00       5         write_str [169]
                0.00    0.00      28/57          writec_queue [78]
-----------------------------------------------
                0.00    0.00       4/4           funcall <cycle 1> [27]
[170]    0.0    0.00    0.00       4         Ldouble_quote_reader [170]
                0.00    0.00       4/4           read_string [174]
                0.00    0.00       4/8           copy_simple_string [158]
-----------------------------------------------
                0.00    0.00       1/4           eval <cycle 1> [3]
                0.00    0.00       3/4           LI1 [2]
[171]    0.0    0.00    0.00       4         Lfresh_line [171]
                0.00    0.00       4/4           coerce_stream [173]
                0.00    0.00       4/92          file_column [68]
                0.00    0.00       3/918         writec_stream [43]
                0.00    0.00       3/126         flush_stream [60]
                0.00    0.00       3/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       4/4           eval <cycle 1> [3]
[172]    0.0    0.00    0.00       4         Lget_internal_run_time [172]
                0.00    0.00       3/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00       4/4           Lfresh_line [171]
[173]    0.0    0.00    0.00       4         coerce_stream [173]
                0.00    0.00       4/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       4/4           Ldouble_quote_reader [170]
[174]    0.0    0.00    0.00       4         read_string [174]
                0.00    0.00     102/137         readc_stream [59]
-----------------------------------------------
                0.00    0.00       3/3           LI1 [2]
[175]    0.0    0.00    0.00       3         Lfind_package [175]
                0.00    0.00       3/8           find_package [160]
-----------------------------------------------
                0.00    0.00       3/3           eval <cycle 1> [3]
[176]    0.0    0.00    0.00       3         Lminus [176]
                0.00    0.00       6/165         check_type_number [56]
                0.00    0.00       3/3           number_minus [187]
-----------------------------------------------
                0.00    0.00       3/3           simple_symlispcall [11]
[177]    0.0    0.00    0.00       3         Lprin1 [177]
                0.00    0.00       3/3           prin1 [189]
-----------------------------------------------
                0.00    0.00       3/3           parse_number [133]
[178]    0.0    0.00    0.00       3         big_to_double [178]
-----------------------------------------------
                                   3             c_apply_n <cycle 1> [48]
[179]    0.0    0.00    0.00       3         fLeval <cycle 1> [179]
                                   3             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00       3/3           write_object [73]
[180]    0.0    0.00    0.00       3         find_symbol [180]
                0.00    0.00       3/45          pack_hash [92]
-----------------------------------------------
                0.00    0.00       3/3           make_ratio [185]
[181]    0.0    0.00    0.00       3         get_gcd [181]
                0.00    0.00       6/12          number_minusp [143]
-----------------------------------------------
                0.00    0.00       1/3           fSallocate_growth [227]
                0.00    0.00       2/3           L1 [32]
[182]    0.0    0.00    0.00       3         list [182]
-----------------------------------------------
                0.00    0.00       3/3           parse_number [133]
[183]    0.0    0.00    0.00       3         make_longfloat [183]
                0.00    0.00       3/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       3/3           parse_namestring [239]
[184]    0.0    0.00    0.00       3         make_one [184]
                0.00    0.00       3/8           copy_simple_string [158]
-----------------------------------------------
                0.00    0.00       3/3           number_divide [124]
[185]    0.0    0.00    0.00       3         make_ratio [185]
                0.00    0.00       6/27          number_zerop [119]
                0.00    0.00       6/6           integer_divide1 [164]
                0.00    0.00       3/12          number_minusp [143]
                0.00    0.00       3/3           get_gcd [181]
                0.00    0.00       3/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       3/3           intern [36]
[186]    0.0    0.00    0.00       3         make_symbol [186]
                0.00    0.00       3/251         alloc_object [52]
                0.00    0.00       3/11          alloc_relblock [146]
-----------------------------------------------
                0.00    0.00       3/3           Lminus [176]
[187]    0.0    0.00    0.00       3         number_minus [187]
                0.00    0.00       3/11          maybe_replace_big [148]
-----------------------------------------------
                0.00    0.00       3/3           write_object [73]
[188]    0.0    0.00    0.00       3         potential_number_p [188]
                0.00    0.00       3/45          digitp [91]
-----------------------------------------------
                0.00    0.00       3/3           Lprin1 [177]
[189]    0.0    0.00    0.00       3         prin1 [189]
                0.00    0.00       3/5           setupPRINTdefault [168]
                0.00    0.00       3/68          write_object [73]
                0.00    0.00       3/5           cleanupPRINT [166]
                0.00    0.00       3/126         flush_stream [60]
                0.00    0.00       3/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       3/3           LI1 [2]
[190]    0.0    0.00    0.00       3         princ_char [190]
                0.00    0.00       6/1434        symbol_value [42]
                0.00    0.00       3/7           check_type_stream [163]
                0.00    0.00       3/918         writec_stream [43]
                0.00    0.00       3/126         flush_stream [60]
-----------------------------------------------
                0.00    0.00       3/3           siLreset_stack_limits [193]
[191]    0.0    0.00    0.00       3         reset_cstack_limit [191]
-----------------------------------------------
                0.00    0.00       3/3           eval <cycle 1> [3]
[192]    0.0    0.00    0.00       3         siLgbc_time [192]
                0.00    0.00       2/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00       3/3           LI1 [2]
[193]    0.0    0.00    0.00       3         siLreset_stack_limits [193]
                0.00    0.00       3/3           reset_cstack_limit [191]
-----------------------------------------------
                0.00    0.00       3/3           LI1 [2]
[194]    0.0    0.00    0.00       3         symlispcall [194]
                0.00    0.00       3/9           symbol_function [156]
-----------------------------------------------
                0.00    0.00       2/2           Lload <cycle 1> [209]
[195]    0.0    0.00    0.00       2         coerce_to_pathname [195]
                0.00    0.00       1/1           parse_namestring [239]
-----------------------------------------------
                0.00    0.00       2/2           c_apply_n <cycle 1> [48]
[196]    0.0    0.00    0.00       2         fLget_internal_real_time [196]
-----------------------------------------------
                0.00    0.00       1/2           free [4150]
                0.00    0.00       1/2           deallocate_stream_buffer [224]
[197]    0.0    0.00    0.00       2         insert_maybe_sgc_contblock [197]
-----------------------------------------------
                0.00    0.00       2/2           funcall <cycle 1> [27]
[198]    0.0    0.00    0.00       2         kar [198]
-----------------------------------------------
                0.00    0.00       1/2           parse_namestring [239]
                0.00    0.00       1/2           merge_pathnames [234]
[199]    0.0    0.00    0.00       2         make_pathname [199]
                0.00    0.00       2/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       2/2           fmt_fix_float [136]
[200]    0.0    0.00    0.00       2         make_shortfloat [200]
                0.00    0.00       2/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       1/2           malloc [39]
                0.00    0.00       1/2           setup_stream_buffer [241]
[201]    0.0    0.00    0.00       2         perm_writable [201]
-----------------------------------------------
                0.00    0.00       2/2           Lload <cycle 1> [209]
[202]    0.0    0.00    0.00       2         string_eq [202]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[203]    0.0    0.00    0.00       1         Fquote [203]
-----------------------------------------------
                                   1             Imacro_expand1 <cycle 1> [205]
[204]    0.0    0.00    0.00       1         Ifuncall_n <cycle 1> [204]
                                   1             IapplyVector <cycle 1> [49]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
[205]    0.0    0.00    0.00       1         Imacro_expand1 <cycle 1> [205]
                                   1             Ifuncall_n <cycle 1> [204]
-----------------------------------------------
                0.00    0.00       1/1           LI21 [207]
[206]    0.0    0.00    0.00       1         LI19 [206]
                0.00    0.00       3/1434        symbol_value [42]
-----------------------------------------------
                0.00    0.00       1/1           quick_call_sfun [240]
[207]    0.0    0.00    0.00       1         LI21 [207]
                0.00    0.00       1/1           LI19 [206]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[208]    0.0    0.00    0.00       1         Lcons [208]
                0.00    0.00       1/251         alloc_object [52]
-----------------------------------------------
                                   1             eval <cycle 1> [3]
[209]    0.0    0.00    0.00       1         Lload <cycle 1> [209]
                0.00    0.00       5/5           write_str [169]
                0.00    0.00       3/1434        symbol_value [42]
                0.00    0.00       2/2           coerce_to_pathname [195]
                0.00    0.00       2/5           setupPRINTdefault [168]
                0.00    0.00       2/92          file_column [68]
                0.00    0.00       2/68          write_object [73]
                0.00    0.00       2/5           cleanupPRINT [166]
                0.00    0.00       2/126         flush_stream [60]
                0.00    0.00       2/2           string_eq [202]
                0.00    0.00       1/37          parse_key [98]
                0.00    0.00       1/1           
check_type_or_pathname_string_symbol_stream [218]
                0.00    0.00       1/1           merge_pathnames [234]
                0.00    0.00       1/8           copy_simple_string [158]
                0.00    0.00       1/1           namestring [235]
                0.00    0.00       1/1           coerce_to_namestring [222]
                0.00    0.00       1/1           user_match [244]
                0.00    0.00       1/1           open_stream [238]
                0.00    0.00       1/1           close_stream [221]
                0.00    0.00       1/57          bds_unwind [76]
                                   6             read_object_non_recursive 
<cycle 1> [154]
                                   5             eval <cycle 1> [3]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[210]    0.0    0.00    0.00       1         Lone_plus [210]
                0.00    0.00       1/165         check_type_number [56]
                0.00    0.00       1/1           one_plus [237]
-----------------------------------------------
                                   1             funcall <cycle 1> [27]
[211]    0.0    0.00    0.00       1         Lsingle_quote_reader <cycle 1> 
[211]
                0.00    0.00       2/84          stack_cons [69]
                                   1             read_object <cycle 1> [35]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[212]    0.0    0.00    0.00       1         Ltimes [212]
                0.00    0.00       2/165         check_type_number [56]
                0.00    0.00       1/1           number_times [236]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[213]    0.0    0.00    0.00       1         Lvalues [213]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[214]    0.0    0.00    0.00       1         Lvalues_list [214]
-----------------------------------------------
                0.00    0.00       1/1           malloc [39]
[215]    0.0    0.00    0.00       1         alloc_simple_string [215]
                0.00    0.00       1/251         alloc_object [52]
-----------------------------------------------
                0.00    0.00       1/1           fSuse_fast_links [229]
[216]    0.0    0.00    0.00       1         check_type_array [216]
-----------------------------------------------
                0.00    0.00       1/1           Lmake_list [4]
[217]    0.0    0.00    0.00       1         check_type_non_negative_integer 
[217]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[218]    0.0    0.00    0.00       1         
check_type_or_pathname_string_symbol_stream [218]
-----------------------------------------------
                0.00    0.00       1/1           t_from_type [243]
[219]    0.0    0.00    0.00       1         check_type_or_symbol_string [219]
-----------------------------------------------
                                   1             Fdefun <cycle 1> [38]
[220]    0.0    0.00    0.00       1         clear_compiler_properties <cycle 
1> [220]
                0.00    0.00       1/1           fSuse_fast_links [229]
                0.00    0.00       1/1           getf [231]
                                   1             ifuncall2 <cycle 1> [233]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[221]    0.0    0.00    0.00       1         close_stream [221]
                0.00    0.00       1/1           deallocate_stream_buffer [224]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[222]    0.0    0.00    0.00       1         coerce_to_namestring [222]
-----------------------------------------------
                0.00    0.00       1/1           namestring [235]
[223]    0.0    0.00    0.00       1         coerce_to_string [223]
-----------------------------------------------
                0.00    0.00       1/1           close_stream [221]
[224]    0.0    0.00    0.00       1         deallocate_stream_buffer [224]
                0.00    0.00       1/16          insert_contblock [131]
                0.00    0.00       1/2           insert_maybe_sgc_contblock 
[197]
-----------------------------------------------
                0.00    0.00       1/1           Fdo <cycle 1> [34]
[225]    0.0    0.00    0.00       1         do_var_list [225]
-----------------------------------------------
                                   1             c_apply_n <cycle 1> [48]
[226]    0.0    0.00    0.00       1         fLfuncall <cycle 1> [226]
                                   1             IapplyVector <cycle 1> [49]
-----------------------------------------------
                0.00    0.00       1/1           c_apply_n <cycle 1> [48]
[227]    0.0    0.00    0.00       1         fSallocate_growth [227]
                0.00    0.00       1/1           t_from_type [243]
                0.00    0.00       1/3           list [182]
-----------------------------------------------
                0.00    0.00       1/1           c_apply_n <cycle 1> [48]
[228]    0.0    0.00    0.00       1         fSgprof_quit [228]
                0.00    0.00       1/1           getwd [232]
-----------------------------------------------
                0.00    0.00       1/1           clear_compiler_properties 
<cycle 1> [220]
[229]    0.0    0.00    0.00       1         fSuse_fast_links [229]
                0.00    0.00       1/1           check_type_array [216]
-----------------------------------------------
                0.00    0.00       1/1           format <cycle 2> [80]
[230]    0.0    0.00    0.00       1         fmt_newline [230]
                0.00    0.00       1/152         fmt_max_param [57]
                0.00    0.00       1/11          fmt_not_colon_atsign [147]
-----------------------------------------------
                0.00    0.00       1/1           clear_compiler_properties 
<cycle 1> [220]
[231]    0.0    0.00    0.00       1         getf [231]
-----------------------------------------------
                0.00    0.00       1/1           fSgprof_quit [228]
[232]    0.0    0.00    0.00       1         getwd [232]
-----------------------------------------------
                                   1             clear_compiler_properties 
<cycle 1> [220]
[233]    0.0    0.00    0.00       1         ifuncall2 <cycle 1> [233]
                0.00    0.00       1/35          super_funcall [106]
                                   1             funcall <cycle 1> [27]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[234]    0.0    0.00    0.00       1         merge_pathnames [234]
                0.00    0.00       1/2           make_pathname [199]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[235]    0.0    0.00    0.00       1         namestring [235]
                0.00    0.00       1/1           coerce_to_string [223]
-----------------------------------------------
                0.00    0.00       1/1           Ltimes [212]
[236]    0.0    0.00    0.00       1         number_times [236]
                0.00    0.00       1/251         alloc_object [52]
                0.00    0.00       1/28          number_to_double [117]
-----------------------------------------------
                0.00    0.00       1/1           Lone_plus [210]
[237]    0.0    0.00    0.00       1         one_plus [237]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[238]    0.0    0.00    0.00       1         open_stream [238]
                0.00    0.00       1/251         alloc_object [52]
                0.00    0.00       1/1           setup_stream_buffer [241]
-----------------------------------------------
                0.00    0.00       1/1           coerce_to_pathname [195]
[239]    0.0    0.00    0.00       1         parse_namestring [239]
                0.00    0.00       3/3           make_one [184]
                0.00    0.00       2/84          stack_cons [69]
                0.00    0.00       1/2           make_pathname [199]
-----------------------------------------------
                0.00    0.00       1/1           funcall <cycle 1> [27]
[240]    0.0    0.00    0.00       1         quick_call_sfun [240]
                0.00    0.00       1/1           LI21 [207]
-----------------------------------------------
                0.00    0.00       1/1           open_stream [238]
[241]    0.0    0.00    0.00       1         setup_stream_buffer [241]
                0.00    0.00       1/14          alloc_contblock [135]
                0.00    0.00       1/2           perm_writable [201]
-----------------------------------------------
                0.00    0.00       1/1           eval <cycle 1> [3]
[242]    0.0    0.00    0.00       1         siLroom_report [242]
                0.00    0.00      13/69          make_fixnum1 [72]
-----------------------------------------------
                0.00    0.00       1/1           fSallocate_growth [227]
[243]    0.0    0.00    0.00       1         t_from_type [243]
                0.00    0.00       1/1           check_type_or_symbol_string 
[219]
-----------------------------------------------
                0.00    0.00       1/1           Lload <cycle 1> [209]
[244]    0.0    0.00    0.00       1         user_match [244]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index      A unique number given to each element of the table.
                Index numbers are sorted numerically.
                The index number is printed next to every function name so
                it is easier to look up where the function in the table.

     % time     This is the percentage of the `total' time that was spent
                in this function and its children.  Note that due to
                different viewpoints, functions excluded by options, etc,
                these numbers will NOT add up to 100%.

     self       This is the total amount of time spent in this function.

     children   This is the total amount of time propagated into this
                function by its children.

     called     This is the number of times the function was called.
                If the function called itself recursively, the number
                only includes non-recursive calls, and is followed by
                a `+' and the number of recursive calls.

     name       The name of the current function.  The index number is
                printed after it.  If the function is a member of a
                cycle, the cycle number is printed between the
                function's name and the index number.


 For the function's parents, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the function into this parent.

     children   This is the amount of time that was propagated from
                the function's children into this parent.

     called     This is the number of times this parent called the
                function `/' the total number of times the function
                was called.  Recursive calls to the function are not
                included in the number after the `/'.

     name       This is the name of the parent.  The parent's index
                number is printed after it.  If the parent is a
                member of a cycle, the cycle number is printed between
                the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the child into the function.

     children   This is the amount of time that was propagated from the
                child's children to the function.

     called     This is the number of times the function called
                this child `/' the total number of times the child
                was called.  Recursive calls by the child are not
                listed in the number after the `/'.

     name       This is the name of the child.  The child's index
                number is printed after it.  If the child is a
                member of a cycle, the cycle number is printed
                between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.


Index by function name

  [38] Fdefun (toplevel.c)   [195] coerce_to_pathname    [186] make_symbol
  [34] Fdo (iteration.c)     [223] coerce_to_string       [19] mark_c_stack 
(gbc.c)
  [31] Fdolist (iteration.c)  [46] copy_relblock (gbc.c)  [16] mark_cons (gbc.c)
 [157] Ffunction (reference.c) [158] copy_simple_string   [15] mark_object 
(gbc.c)
  [61] Fif (conditional.c)    [45] ctl_advance (format.c)  [9] mark_phase 
(gbc.c)
  [85] Flet (let.c)           [95] current_package        [18] 
mark_stack_carefully (gbc.c)
  [22] Fmultiple_value_list (multival.c) [153] current_readtable (read.d) [148] 
maybe_replace_big
  [82] Fprogn                [224] deallocate_stream_buffer (file.d) [75] 
member_string_equal (package.d)
  [26] Fpush (assignment.c)   [74] designate_package (package.d) [234] 
merge_pathnames
 [203] Fquote (reference.c)   [71] digit_weight          [149] mul_int_big
 [144] Fsetq (assignment.c)   [91] digitp                [235] namestring
  [96] Ftagbody              [225] do_var_list (iteration.c) [141] new_bignum
   [7] GBC                   [118] edit_double           [142] normalize_big
  [49] IapplyVector           [64] eql                   [162] 
normalize_big_to_object
 [125] Ieval                   [3] eval                  [114] nthcdr
 [204] Ifuncall_n            [159] fLapply               [124] number_divide
  [12] Iinvoke_c_function_from_value_stack [179] fLeval  [187] number_minus
 [205] Imacro_expand1        [122] fLformat              [143] number_minusp
 [120] Ivs_values            [226] fLfuncall              [84] number_plus
  [32] L1 (gcl_mislib.c)     [196] fLget_internal_real_time [236] number_times
 [206] LI19 (gcl_debug.c)     [53] fLnth                 [117] number_to_double
 [207] LI21 (gcl_cmputil.c)  [112] fLnull                [119] number_zerop
  [24] Lappend               [227] fSallocate_growth     [237] one_plus
 [100] Lassoc                [228] fSgprof_quit          [238] open_stream
 [101] Lassoc_or_rassoc (list.d) [229] fSuse_fast_links   [92] pack_hash
  [90] Lcar                  [103] feof1 (file.d)         [98] parse_key
  [97] Lcdr                   [68] file_column           [239] parse_namestring
 [208] Lcons                 [160] find_package          [133] parse_number 
(read.d)
 [134] Ldivide                [81] find_special          [201] perm_writable
 [170] Ldouble_quote_reader (read.d) [180] find_symbol   [188] 
potential_number_p (print.d)
 [175] Lfind_package         [113] fixint                [189] prin1
  [13] Lformat                [83] fixnum_add            [108] princ
 [171] Lfresh_line           [167] flush_queue (print.d) [190] princ_char
 [172] Lget_internal_run_time [60] flush_stream          [240] quick_call_sfun 
(eval.c)
  [23] Lleft_parenthesis_reader (read.d) [67] fmt_advance (format.c) [35] 
read_object
  [94] Llist                 [107] fmt_ascii (format.c)  [154] 
read_object_non_recursive
 [209] Lload (file.d)        [151] fmt_conditional (format.c) [174] read_string 
(read.d)
   [4] Lmake_list            [109] fmt_decimal (format.c) [59] readc_stream
 [176] Lminus                [136] fmt_fix_float (format.c) [191] 
reset_cstack_limit (main.c)
 [132] Lnconc                [110] fmt_integer (format.c) [30] reverse
 [111] Lnthcdr               [161] fmt_iteration (format.c) [55] rl_getc_em
 [210] Lone_plus              [57] fmt_max_param (format.c) [44] rl_putc_em
  [89] Lplus                 [230] fmt_newline (format.c) [79] rl_ungetc_em
 [177] Lprin1                 [93] fmt_not_atsign (format.c) [54] runtime
  [14] Lread                  [87] fmt_not_colon (format.c) [99] setq
  [29] Lreverse              [147] fmt_not_colon_atsign (format.c) [168] 
setupPRINTdefault
 [211] Lsingle_quote_reader (read.d) [137] fmt_percent (format.c) [104] 
setupTEST (list.d)
 [150] Lterpri                [47] fmt_set_param (format.c) [155] setup_READ 
(read.d)
 [212] Ltimes                [130] fmt_skip (format.c)   [241] 
setup_stream_buffer
 [213] Lvalues               [123] fmt_tabulate (format.c) [192] siLgbc_time 
(gbc.c)
 [214] Lvalues_list           [58] fmt_tempstr (format.c) [193] 
siLreset_stack_limits
 [129] Lzerop                [116] fmt_up_and_out (format.c) [242] 
siLroom_report (gbc.c)
 [145] add_int_big            [80] format (format.c)      [11] 
simple_symlispcall
  [17] add_page_to_freelist   [27] funcall                [69] stack_cons
 [135] alloc_contblock        [50] funcall_no_event      [105] stream_at_end
  [52] alloc_object          [181] get_gcd               [202] string_eq
  [41] alloc_page            [231] getf                   [70] string_equal
 [146] alloc_relblock        [232] getwd                 [106] super_funcall
 [215] alloc_simple_string   [140] grow_linear (alloc.c)  [10] sweep_phase 
(gbc.c)
  [25] append                 [65] identity (list.d)     [156] symbol_function
  [88] assoc_eq              [233] ifuncall2              [42] symbol_value
  [76] bds_unwind            [131] insert_contblock      [194] symlispcall
 [178] big_to_double         [197] insert_maybe_sgc_contblock [243] t_from_type 
(alloc.c)
  [20] bind_var              [164] integer_divide1       [152] terpri
  [48] c_apply_n             [165] integer_quotient_remainder_1 [66] test_eql 
(list.d)
 [139] call_after_gbc_hook (alloc.c) [36] intern         [127] unread_char 
(read.d)
  [63] car                   [198] kar                   [128] unreadc_stream
 [102] check_stream           [37] lambda_bind           [244] user_match
 [216] check_type_array       [21] let_bind              [126] 
verify_big_or_zero (gmp_big.c)
 [217] check_type_non_negative_integer [86] let_var_list  [73] write_object
  [56] check_type_number      [28] lex_block_bind        [169] write_str
 [218] check_type_or_pathname_string_symbol_stream [182] list [51] 
writec_PRINTstream
 [219] check_type_or_symbol_string [33] listA             [78] writec_queue 
(print.d)
 [163] check_type_stream      [77] macro_expand           [43] writec_stream
 [121] check_type_string       [5] make_cons             [138] writestr_stream
 [166] cleanupPRINT           [72] make_fixnum1          [115] zero_big
 [220] clear_compiler_properties [183] make_longfloat      [1] <cycle 1>
  [62] clear_stack           [184] make_one (pathname.d)  [40] <cycle 2>
 [221] close_stream          [199] make_pathname           [8] <cycle 3>
 [173] coerce_stream         [185] make_ratio              [6] <cycle 4>
 [222] coerce_to_namestring  [200] make_shortfloat

NIL

>(by)

Program exited normally.
(gdb)
=============================================================================

Documentation to come.  There are quite a few interesting gprof flags
which could be supported (see man gprof), as well as an eventual
integration with the native profiling method used for compiled user
functions.  Right now I'm not sure how these latter would be reported.
At least initially, one should be able to build a user image using
(compiler::link ...) on which gprof should run just like any C
program.  I can supply details on request (a la the build method for
axiom) on how this can be mostly automated when customarily building
images via simple (load ...) calls followed by (si::save-system).


Take care,


"Matt Kaufmann" <address@hidden> writes:

> Thanks, Camm.  If/when it's important to you for me to re-run the local big
> test, let me know.
> 
> In case the question I raised was buried in my preceding email, here it is
> again.  It would be great to get allocation etc. right in ACL2 to properly
> leverage off all the work put into GCL.
> 
>   I have a question about this passage from your previous email:
> 
>     As for your performance observations, as you know I still have a bit
>     of profiling on my todo list concerning acl2, so a definitive
>     statement will have to wait until then.  But I noticed in the existing
>     acl2 code a comment in which SGC is turned on "at the suggestion of
>     wfs" at a certain point.  Just to make sure we all understand, SGC is
>     a GC *write barrier*, it is only efficient if most of the data behind
>     the barrier (before executing (sgc-on t)) is static.  With your
>     enormous image, you should make sure that sgc is not turned on too
>     early.  As my patches only affect sgc contiguous pages, and as these
>     seem to affect your results, this may be a factor in your poor
>     performance.  
> 
>   Can you expand on this?  Is your concern that we aren't including enough
>   read-only stuff before saving the image?  We turn sgc on just before doing 
> some
>   allocation, setting the hole size, and then saving the image.
> 
> Thanks --
> -- Matt
>    cc: address@hidden, address@hidden, address@hidden,
>       address@hidden
>    From: "Camm Maguire" <address@hidden>
>    Date: 29 Aug 2003 16:47:47 -0400
>    User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>    X-WSS-ID: 135164733245565-01-01
>    Content-Type: text/plain;
>     charset=us-ascii
> 
>    Greetings!  OK, I'm enclosing the final patch I've just committed.
>    Passes all known tests, but I'll be continuing to test it out in the
>    coming days.  Any reports on problems with this most appreciated.
> 
>    BTW, this shouldn't really affect performance that much, but should
>    completely cure the allocation error you reported in the bignum
>    example.  The patch you tested had some debugging calls which are now
>    removed unless one defined SGC_CONT_DEBUG.  Any further tests will
>    probably be a bit faster but noting to write home about.
> 
>    Here's an interesting toy benchmark based on your example:
> 
>    
> =============================================================================
>    test3.lisp
>    
> =============================================================================
>    (in-package 'user)
>    (defconstant *A* #x5A39BFA0E42A3D15)
>    (defconstant *M* (expt 2 63))
>    (defconstant *C* 1)
> 
> 
>    (defun genseed (seed)
>      (mod (+ (* *A* seed) *C*) *M*))
> 
> 
>    (defun testfun (n seed)
>      (if (or (not (integerp n)) (<= n 0))
>        seed
>        (let* ((s0 (genseed seed))
>             (s1 (genseed s0)))
>        (testfun (1- n) s1))))
> 
>    
> =============================================================================
>    foo
>    
> =============================================================================
>    ;(si::sgc-on t)
>    (si::allocate-relocatable-pages 500)
>    (si::allocate-contiguous-pages 500)
>    ;(si::allocate-sgc 'contiguous 500 3000 0)
>    (si::allocate 'cfun 166)
>    (si::allocate-sgc 'cfun 166 3000 0)
>    (in-package "USER")
>    ;(compile-file "/tmp/test3.lisp") ; test3.lisp is shown below
>    (load "/tmp/test3")
>    (format t "~S~%" (testfun 1000000 3))
>    
> =============================================================================
>    (defun bench (&aux res) 
>    ;  (setq si::*notify-gbc* t)
>      (si::allocate-relocatable-pages 500)
>      (si::allocate-contiguous-pages 500)
>      (dolist (on '(t nil))
>        (dolist (reloc '(nil t))
>        (dolist (bon '(0 167))
>          (dolist (con '(0 500))
>            (progn
>              (si::set-gmp-allocate-relocatable reloc)
>              (si::allocate-sgc 'cfun bon 3000 0)
>              (si::allocate-sgc 'contiguous con 3000 0)
>              (si::sgc-on nil)
>              (si::sgc-on on)
>              (si::gbc-time 0)
>              (load "/tmp/foo")
>              (let ((foo (list (list on reloc bon con) (si::gbc-time))))
>                (format t "~S~%" foo)
>                (push foo  res)))))))
>      res
>    
> )=============================================================================
>    
> =============================================================================
>    (bench)
>    
> =============================================================================
>    ((NIL T 167 500) 33)
>    (((NIL T 167 500) 33) ((NIL T 167 0) 33) ((NIL T 0 500) 33)
>     ((NIL T 0 0) 36) ((NIL NIL 167 500) 46) ((NIL NIL 167 0) 48)
>     ((NIL NIL 0 500) 43) ((NIL NIL 0 0) 39) ((T T 167 500) 125)
>     ((T T 167 0) 100) ((T T 0 500) 37) ((T T 0 0) 31) ((T NIL 167 500) 65)
>     ((T NIL 167 0) 68) ((T NIL 0 500) 115) ((T NIL 0 0) 113))
>    
> =============================================================================
> 
>    Take care,
> 
>    
> =============================================================================
>    Index: debian/changelog
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/debian/changelog,v
>    retrieving revision 1.220.2.1.4.1.2.1.2.1.2.2.2.1.2.16
>    diff -u -r1.220.2.1.4.1.2.1.2.1.2.2.2.1.2.16 changelog
>    --- debian/changelog       22 Aug 2003 17:09:42 -0000      
> 1.220.2.1.4.1.2.1.2.1.2.2.2.1.2.16
>    +++ debian/changelog       29 Aug 2003 20:38:47 -0000
>    @@ -37,8 +37,9 @@
>       simultaneously
>       * Add gazonk*.lsp to clean target
>       * syntax fix to lsp/gprof.hc
>    +  * Add support for SGC contblock pages
> 
>    - -- Camm Maguire <address@hidden>  Fri, 22 Aug 2003 17:11:19 +0000
>    + -- Camm Maguire <address@hidden>  Fri, 29 Aug 2003 18:34:00 +0000
> 
>     gcl (2.5.3-2) unstable; urgency=low
> 
>    Index: h/new_decl.h
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/h/new_decl.h,v
>    retrieving revision 1.42.4.1.2.2
>    diff -u -r1.42.4.1.2.2 new_decl.h
>    --- h/new_decl.h   20 Jul 2003 18:00:12 -0000      1.42.4.1.2.2
>    +++ h/new_decl.h   29 Aug 2003 20:38:48 -0000
>    @@ -1,465 +1,406 @@
>    -EXTER  object   fLbye   (fixnum exitc) ; 
>    -EXTER  object   fLquit   (fixnum exitc) ; 
>    -EXTER  object   fLexit   (fixnum exitc) ; 
>    -EXTER object  sSAno_initA ; 
>    -EXTER  object   fLidentity   (object x0) ; 
>    -EXTER  object   fLlisp_implementation_version   (void) ; 
>    -EXTER object  sSAlisp_maxpagesA ; 
>    -EXTER object  sSAsystem_directoryA ; 
>    -EXTER object  sSAmultiply_stacksA ; 
>    -EXTER object  sStop_level ; 
>    -EXTER object  sSAcommand_argsA ; 
>    -EXTER object  sSAafter_gbc_hookA ; 
>    -EXTER object  sSAignore_maximum_pagesA ; 
>    -EXTER  object   fSallocated   (object typ) ; 
>    -EXTER  object   fSreset_number_used   (object typ) ; 
>    -EXTER  object   fSstaticp   (object x) ; 
>    -EXTER  object   fSallocate   (object type,fixnum npages,...) ; 
>    -EXTER  object   fSallocate_sgc   (object type,fixnum min,fixnum 
> max,fixnum free_percent) ; 
>    -EXTER  object   fSallocate_growth   
>    -      (object type,fixnum min,fixnum max,fixnum percent,fixnum 
> percent_free) ; 
>    -EXTER  object   fSallocate_contiguous_pages   (fixnum npages,...) ; 
>    -EXTER  object   fSallocated_contiguous_pages   (void) ; 
>    -EXTER  object   fSmaximum_contiguous_pages   (void) ; 
>    -EXTER  object   fSallocate_relocatable_pages   (fixnum npages,...) ; 
>    -EXTER  object   fSallocated_relocatable_pages   (void) ; 
>    -EXTER  object   fSget_hole_size   (void) ; 
>    -EXTER  object   fSset_hole_size   (fixnum npages,...) ; 
>    -EXTER  object   fLgbc   (object x0) ; 
>    -EXTER object  sSAnotify_gbcA ; 
>    -EXTER object  sSAgbc_messageA ; 
>    -EXTER object  sLcommon ; 
>    -EXTER object  sLnull ; 
>    -EXTER object  sLcons ; 
>    -EXTER object  sLlist ; 
>    -EXTER object  sLsymbol ; 
>    -EXTER object  sLarray ; 
>    -EXTER object  sLvector ; 
>    -EXTER object  sLbit_vector ; 
>    -EXTER object  sLstring ; 
>    -EXTER object  sLsequence ; 
>    -EXTER object  sLsimple_array ; 
>    -EXTER object  sLsimple_vector ; 
>    -EXTER object  sLsimple_bit_vector ; 
>    -EXTER object  sLsimple_string ; 
>    -EXTER object  sLfunction ; 
>    -EXTER object  sLcompiled_function ; 
>    -EXTER object  sLpathname ; 
>    -EXTER object  sLcharacter ; 
>    -EXTER object  sLnumber ; 
>    -EXTER object  sLrational ; 
>    -EXTER object  sLfloat ; 
>    -EXTER object  sLstring_char ; 
>    -EXTER object  sLinteger ; 
>    -EXTER object  sLratio ; 
>    -EXTER object  sLshort_float ; 
>    -EXTER object  sLstandard_char ; 
>    -EXTER object  sLboolean ; 
>    -EXTER object  sLfixnum ; 
>    -EXTER object  sLpositive_fixnum ; 
>    -EXTER object  sLcomplex ; 
>    -EXTER object  sLsingle_float ; 
>    -EXTER object  sLpackage ; 
>    -EXTER object  sLbignum ; 
>    -EXTER object  sLrandom_state ; 
>    -EXTER object  sLdouble_float ; 
>    -EXTER object  sLstream ; 
>    -EXTER object  sLbit ; 
>    -EXTER object  sLreadtable ; 
>    -EXTER object  sLlong_float ; 
>    -EXTER object  sLhash_table ; 
>    -EXTER object  sLkeyword ; 
>    -EXTER object  sLstructure ; 
>    -EXTER object  sLsatisfies ; 
>    -EXTER object  sLmember ; 
>    -EXTER object  sLnot ; 
>    -EXTER object  sLor ; 
>    -EXTER object  sLand ; 
>    -EXTER object  sLvalues ; 
>    -EXTER object  sLmod ; 
>    -EXTER object  sLsigned_byte ; 
>    -EXTER object  sLunsigned_byte ; 
>    -EXTER object  sLsigned_char ; 
>    -EXTER object  sLunsigned_char ; 
>    -EXTER object  sLsigned_short ; 
>    -EXTER object  sLunsigned_short ; 
>    -EXTER object  sLA ; 
>    -EXTER object  sLplusp ; 
>    -EXTER object  sLmethod_combination ; 
>    -EXTER object  sLarithmetic_error ; 
>    -EXTER object  sLbase_char ; 
>    -EXTER object  sLbase_string ; 
>    -EXTER object  sLbroadcast_stream ; 
>    -EXTER object  sLbuilt_in_class ; 
>    -EXTER object  sLcell_error ; 
>    -EXTER object  sLclass ; 
>    -EXTER object  sLconcatenated_stream ; 
>    -EXTER object  sLcondition ; 
>    -EXTER object  sLcontrol_error ; 
>    -EXTER object  sLdivision_by_zero ; 
>    -EXTER object  sLecho_stream ; 
>    -EXTER object  sLend_of_file ; 
>    -EXTER object  sLerror ; 
>    -EXTER object  sLextended_char ; 
>    -EXTER object  sLfile_error ; 
>    -EXTER object  sLfile_stream ; 
>    -EXTER object  sLfloating_point_inexact ; 
>    -EXTER object  sLfloating_point_invalid_operation ; 
>    -EXTER object  sLfloating_point_overflow ; 
>    -EXTER object  sLfloating_point_underflow ; 
>    -EXTER object  sLgeneric_function ; 
>    -EXTER object  sLlogical_pathname ; 
>    -EXTER object  sLmethod ; 
>    -EXTER object  sLpackage_error ; 
>    -EXTER object  sLparse_error ; 
>    -EXTER object  sLprint_not_readable ; 
>    -EXTER object  sLprogram_error ; 
>    -EXTER object  sLreader_error ; 
>    -EXTER object  sLserious_condition ; 
>    -EXTER object  sLsimple_base_string ; 
>    -EXTER object  sLsimple_condition ; 
>    -EXTER object  sLsimple_type_error ; 
>    -EXTER object  sLsimple_warning ; 
>    -EXTER object  sLstandard_class ; 
>    -EXTER object  sLstandard_generic_function ; 
>    -EXTER object  sLstandard_method ; 
>    -EXTER object  sLstandard_object ; 
>    -EXTER object  sLstorage_condition ; 
>    -EXTER object  sLstream_error ; 
>    -EXTER object  sLstring_stream ; 
>    -EXTER object  sLstructure_class ; 
>    -EXTER object  sLstructure_object ; 
>    -EXTER object  sLstyle_warning ; 
>    -EXTER object  sLsynonym_stream ; 
>    -EXTER object  sLtwo_way_stream ; 
>    -EXTER object  sLtype_error ; 
>    -EXTER object  sLunbound_slot ; 
>    -EXTER object  sLunbound_variable ; 
>    -EXTER object  sLundefined_function ; 
>    -EXTER object  sLwarning ; 
>    -EXTER object  sSchar_size ; 
>    -EXTER object  sSshort_size ; 
>    -EXTER  object   fLfuncall   (object fun,...) ; 
>    -EXTER  object   fLapply   (object fun,...) ; 
>    -EXTER  object   fLeval   (object x0) ; 
>    -EXTER  object   fLconstantp   (object x0) ; 
>    -EXTER object  sSlambda_block_expanded ; 
>    -EXTER object  sSAbreak_pointsA ; 
>    -EXTER object  sSAbreak_stepA ; 
>    -EXTER  object   fLmacroexpand   (object form,...) ; 
>    -EXTER object  sLfuncall ; 
>    -EXTER object  sLAmacroexpand_hookA ; 
>    -EXTER object  sSdefmacroA ; 
>    -EXTER object  sSAinhibit_macro_specialA ; 
>    -EXTER  object   fLnot   (object x0) ; 
>    -EXTER  object   fLnot   (object x0) ; 
>    -EXTER  object   fLsymbolp   (object x0) ; 
>    -EXTER  object   fLatom    (object x0) ; 
>    -EXTER  object   fLconsp   (object x0) ; 
>    -EXTER  object   fLlistp   (object x0) ; 
>    -EXTER  object   fLnumberp   (object x0) ; 
>    -EXTER  object   fLintegerp    (object x0) ; 
>    -EXTER  object   fLrationalp   (object x0) ; 
>    -EXTER  object   fLrealp   (object x0) ; 
>    -EXTER  object   fLfloatp   (object x0) ; 
>    -EXTER  object   fLcomplexp   (object x0) ; 
>    -EXTER  object   fLcharacterp   (object x0) ; 
>    -EXTER  object   fLstringp    (object x0) ; 
>    -EXTER  object   fLbit_vector_p   (object x0) ; 
>    -EXTER  object   fLvectorp   (object x0) ; 
>    -EXTER  object   fLsimple_string_p   (object x0) ; 
>    -EXTER  object   fLsimple_bit_vector_p    (object x0) ; 
>    -EXTER  object   fLsimple_vector_p    (object x0) ; 
>    -EXTER  object   fLarrayp    (object x0) ; 
>    -EXTER  object   fLpackagep    (object x0) ; 
>    -EXTER  object   fLfunctionp   (object x0) ; 
>    -EXTER  object   fLcompiled_function_p   (object x0) ; 
>    -EXTER  object   fLcommonp   (object x0) ; 
>    -EXTER  object   fLeq   (object x0,object x1) ; 
>    -EXTER  object   fLeql   (object x0,object x1) ; 
>    -EXTER  object   fLequal   (object x0,object x1) ; 
>    -EXTER  object   fLequalp   (object x0,object x1) ; 
>    -EXTER  object   fScontains_sharp_comma   (object x0) ; 
>    -EXTER  object   fSspicep    (object x0) ; 
>    -EXTER  object   fSfixnump   (object x0) ; 
>    -EXTER  object   fLset   (object symbol,object value) ; 
>    -EXTER  object   fSfset   (object sym,object function) ; 
>    -EXTER  object   fLmakunbound   (object sym) ; 
>    -EXTER  object   fLfmakunbound   (object sym) ; 
>    -EXTER object  sSclear_compiler_properties ; 
>    -EXTER  object   fSclear_compiler_properties   (object x0,object x1) ; 
>    -EXTER object  sLaref ; 
>    -EXTER object  sLcar ; 
>    -EXTER object  sLcdr ; 
>    -EXTER object  sLchar ; 
>    -EXTER object  sLdecf ; 
>    -EXTER object  sLelt ; 
>    -EXTER object  sLfill_pointer ; 
>    -EXTER object  sLget ; 
>    -EXTER object  sLgetf ; 
>    -EXTER object  sLgethash ; 
>    -EXTER object  sLincf ; 
>    -EXTER object  sLpop ; 
>    -EXTER object  sLpush ; 
>    -EXTER object  sLschar ; 
>    -EXTER object  sLsetf ; 
>    -EXTER object  sSsetf_lambda ; 
>    -EXTER object  sSstructure_access ; 
>    -EXTER object  sLsvref ; 
>    -EXTER object  sStraced ; 
>    -EXTER object  sLvector ; 
>    -EXTER object  sKallow_other_keys ; 
>    -EXTER  object   fSerror_set   (volatile object x0) ; 
>    -EXTER object  sLgensym_counter ; 
>    -EXTER  object   fSmc   (object name,object address) ; 
>    -EXTER  object   fSmfsfun   (object name,object address,object argd) ; 
>    -EXTER  object   fSmfvfun   (object name,object address,object argd) ; 
>    -EXTER  object   fSmfvfun_key   (object symbol,object address,object 
> argd,object keys) ; 
>    -EXTER  object   fSmf   (object name,object addr) ; 
>    -EXTER  object   fSmm   (object name,object addr) ; 
>    -EXTER  object   fScompiled_function_name   (object fun) ; 
>    -EXTER  object   fSturbo_closure   (object funobj) ; 
>    -EXTER  object   fSspecialp   (object sym) ; 
>    -EXTER object  sSdebug ; 
>    -EXTER  object   fSdefvar1   (object sym,object val,...) ; 
>    -EXTER  object   fSdebug   (object sym,object val) ; 
>    -EXTER  object   fSsetvv   (object index,object val) ; 
>    -EXTER object  sSPmemory ; 
>    -EXTER object  sSPinit ; 
>    -EXTER   object    fSinit_cmp_anon   (void) ; 
>    -EXTER object  sKexternal ; 
>    -EXTER object  sKinherited ; 
>    -EXTER object  sKinternal ; 
>    -EXTER object  sKnicknames ; 
>    -EXTER object  sKuse ; 
>    -EXTER object  sLApackageA ; 
>    -EXTER  object   fSset_gmp_allocate_relocatable   
>    -      (object flag) ; 
>    -EXTER  object   fSallocate_bigger_fixnum_range   (fixnum min,fixnum max) 
> ; 
>    -EXTER  object   fScmod   (object num) ; 
>    -EXTER  object   fScplus   (object x0,object x1) ; 
>    -EXTER  object   fSctimes   (object x0,object x1) ; 
>    -EXTER  object   fScdifference   (object x0,object x1) ; 
>    -EXTER  object   fLnth   (fixnum index,object list) ; 
>    -EXTER  object   fLfirst   (object x) ; 
>    -EXTER  object   fLsecond   (object x) ; 
>    -EXTER  object   fLthird   (object x) ; 
>    -EXTER  object   fLfourth   (object x) ; 
>    -EXTER  object   fLfifth   (object x) ; 
>    -EXTER  object   fLsixth   (object x) ; 
>    -EXTER  object   fLseventh   (object x) ; 
>    -EXTER  object   fLeighth   (object x) ; 
>    -EXTER  object   fLninth   (object x) ; 
>    -EXTER  object   fLtenth   (object x) ; 
>    -EXTER  object   fSnext_hash_table_entry   (object table,object ind) ; 
>    -EXTER  object   fLhash_table_test   (object table) ; 
>    -EXTER  object   fLhash_table_size   (object table) ; 
>    -EXTER object   sLarray_rank_limit ; 
>    -EXTER object   sLarray_dimension_limit ; 
>    -EXTER object   sLarray_total_size_limit ; 
>    -EXTER object  sLbit ; 
>    -EXTER   object    fLaref   (object x,fixnum i, ...) ; 
>    -EXTER   object    fLsvref   (object x,ufixnum i) ; 
>    -EXTER   object    fLrow_major_aref   (object x,fixnum i) ; 
>    -EXTER   object    fSaset1   (object x, fixnum i,object val) ; 
>    -EXTER   object    fSaset   (object x,fixnum i,object y, ...) ; 
>    -EXTER   object    fSsvset   (object x,fixnum i,object val) ; 
>    -EXTER  object   fSmake_vector1   (fixnum n,fixnum elt_type,object 
> staticp,...) ; 
>    -EXTER  object   fSget_aelttype   (object x) ; 
>    -EXTER  object   fSmake_vector   (object x0,object x1,object x2,object 
> x3,object x4,object x5,object x6,...) ; 
>    -EXTER  object   fSmake_array1   
>    -      (fixnum elt_type,object staticp,object initial_element,object 
> displaced_to,fixnum displaced_index_offset,
>    -       object dimensions) ; 
>    -EXTER  object   fScopy_array_portion   (object x,object y,fixnum 
> i1,fixnum i2,object n1o) ; 
>    -EXTER  object   fSfill_pointer_set   (object x,fixnum i) ; 
>    -EXTER  object   fLfill_pointer   (object x) ; 
>    -EXTER  object   
>    -      fLarray_has_fill_pointer_p   (object x) ; 
>    -EXTER  object   fLarray_element_type   (object x) ; 
>    -EXTER  object   fLadjustable_array_p   (object x) ; 
>    -EXTER  object   fSdisplaced_array_p   (object x) ; 
>    -EXTER  object   fLarray_rank   (object x) ; 
>    -EXTER  object   fLarray_dimension   (object x,fixnum i) ; 
>    -EXTER  object   fSreplace_array   (object old,object new) ; 
>    -EXTER  object   fLarray_total_size   (object x) ; 
>    -EXTER  object   fSaset_by_cursor   (object array,object val,object 
> cursor) ; 
>    -EXTER object  sSAmatch_dataA ; 
>    -EXTER object  sSAcase_fold_searchA ; 
>    -EXTER  object   fSmatch_beginning   (fixnum i) ; 
>    -EXTER  object   fSmatch_end   (fixnum i) ; 
>    -EXTER  object   fSstring_match   (object pattern,object string,...) ; 
>    -EXTER object  sSs_data ; 
>    -EXTER object  sLcompile ; 
>    -EXTER object  sLdeclare ; 
>    -EXTER object  sLeval ; 
>    -EXTER object  sLeval ; 
>    -EXTER object  sSfunction_documentation ; 
>    -EXTER object  sLload ; 
>    -EXTER object  sLprogn ; 
>    -EXTER object  sLtypep ; 
>    -EXTER object  sLvalues ; 
>    -EXTER object  sSvariable_documentation ; 
>    -EXTER object  sLwarn ; 
>    -EXTER object  sSAallow_gzipped_fileA ; 
>    -EXTER object  sKmyaddr ; 
>    -EXTER object  sKmyport ; 
>    -EXTER object  sKasync ; 
>    -EXTER object  sKhost ; 
>    -EXTER object  sKserver ; 
>    -EXTER object  sSsocket ; 
>    -EXTER object  sLAstandard_inputA ; 
>    -EXTER object  sLAstandard_outputA ; 
>    -EXTER object  sLAerror_outputA ; 
>    -EXTER object  sLAterminal_ioA ; 
>    -EXTER object  sLAquery_ioA ; 
>    -EXTER object  sLAdebug_ioA ; 
>    -EXTER object  sLAtrace_outputA ; 
>    -EXTER object  sSAignore_eof_on_terminal_ioA ; 
>    -EXTER object  sSAload_pathnameA ; 
>    -EXTER object  sLAload_verboseA ; 
>    -EXTER object  sKabort ; 
>    -EXTER object  sKappend ; 
>    -EXTER object  sKcreate ; 
>    -EXTER object  sKdefault ; 
>    -EXTER object  sKdirection ; 
>    -EXTER object  sKelement_type ; 
>    -EXTER object  sKerror ; 
>    -EXTER object  sKif_does_not_exist ; 
>    -EXTER object  sKif_exists ; 
>    -EXTER object  sKinput ; 
>    -EXTER object  sKio ; 
>    -EXTER object  sKnew_version ; 
>    -EXTER object  sKoutput ; 
>    -EXTER object  sKoverwrite ; 
>    -EXTER object  sKprint ; 
>    -EXTER object  sKprobe ; 
>    -EXTER object  sKrename ; 
>    -EXTER object  sKrename_and_delete ; 
>    -EXTER object  sKset_default_pathname ; 
>    -EXTER object  sKsupersede ; 
>    -EXTER object  sKverbose ; 
>    -EXTER object  sLAread_default_float_formatA ; 
>    -EXTER object  sLAread_baseA ; 
>    -EXTER object  sLAread_suppressA ; 
>    -EXTER object  sSY ; 
>    -EXTER object  sSYB ; 
>    -EXTER object  sSYZ ; 
>    -EXTER object  sLlistA ; 
>    -EXTER object  sLappend ; 
>    -EXTER object  sLnconc ; 
>    -EXTER object  sLapply ; 
>    -EXTER object  sLvector ; 
>    -EXTER object  sKupcase ; 
>    -EXTER object  sKdowncase ; 
>    -EXTER object  sKcapitalize ; 
>    -EXTER object  sKstream ; 
>    -EXTER object  sKescape ; 
>    -EXTER object  sKreadably ; 
>    -EXTER object  sKpretty ; 
>    -EXTER object  sKcircle ; 
>    -EXTER object  sKbase ; 
>    -EXTER object  sKradix ; 
>    -EXTER object  sKcase ; 
>    -EXTER object  sKgensym ; 
>    -EXTER object  sKlevel ; 
>    -EXTER object  sKlength ; 
>    -EXTER object  sKarray ; 
>    -EXTER object  sLAprint_escapeA ; 
>    -EXTER object  sLAprint_readablyA ; 
>    -EXTER object  sLAprint_prettyA ; 
>    -EXTER object  sLAprint_circleA ; 
>    -EXTER object  sLAprint_baseA ; 
>    -EXTER object  sLAprint_radixA ; 
>    -EXTER object  sLAprint_caseA ; 
>    -EXTER object  sLAprint_gensymA ; 
>    -EXTER object  sLAprint_levelA ; 
>    -EXTER object  sLAprint_lengthA ; 
>    -EXTER object  sLAprint_arrayA ; 
>    -EXTER object  sSAprint_packageA ; 
>    -EXTER object  sSAprint_structureA ; 
>    -EXTER object  sSpretty_print_format ; 
>    -EXTER object  sSAprint_nansA ; 
>    -EXTER  object   fLformat   (object strm, object control,...) ; 
>    -EXTER object  sSAindent_formatted_outputA ; 
>    -EXTER  object   fSsetenv   (object variable,object value) ; 
>    -EXTER  object   fLdelete_file   (object path) ; 
>    -EXTER  object   fLerror   (object fmt_string,...) ; 
>    -EXTER  object   fLspecific_error   (object error_name,object 
> fmt_string,...) ; 
>    -EXTER  object   fLspecific_correctable_error   
>    -       (object error_name,object fmt_string,...) ; 
>    -EXTER  object   fLcerror   (object continue_fmt_string,object 
> fmt_string,...) ; 
>    -EXTER  object   fSihs_top   (void) ; 
>    -EXTER  object   fSihs_fun   (object x0) ; 
>    -EXTER  object   fSihs_vs   (object x0) ; 
>    -EXTER  object   fSfrs_top   (void) ; 
>    -EXTER  object   fSfrs_vs   (object x0) ; 
>    -EXTER  object   fSfrs_bds   (object x0) ; 
>    -EXTER  object   fSfrs_class   (object x0) ; 
>    -EXTER  object   fSfrs_tag   (object x0) ; 
>    -EXTER  object   fSfrs_ihs   (object x0) ; 
>    -EXTER  object   fSbds_top   (void) ; 
>    -EXTER  object   fSbds_var   (object x0) ; 
>    -EXTER  object   fSbds_val   (object x0) ; 
>    -EXTER  object   fSvs_top   (void) ; 
>    -EXTER  object   fSvs   (object x0) ; 
>    -EXTER  object   fSsch_frs_base   (object x0,object x1) ; 
>    -EXTER  object   fSinternal_super_go   (object tag,object x1,object x2) ; 
>    -EXTER object  sSuniversal_error_handler ; 
>    -EXTER  object   fSuniversal_error_handler   (object x0,object x1,object 
> x2,object x3,object error_fmt_string) ; 
>    -EXTER object  sSterminal_interrupt ; 
>    -EXTER object  sKwrong_type_argument ; 
>    -EXTER object  sKtoo_few_arguments ; 
>    -EXTER object  sKtoo_many_arguments ; 
>    -EXTER object  sKunexpected_keyword ; 
>    -EXTER object  sKinvalid_form ; 
>    -EXTER object  sKunbound_variable ; 
>    -EXTER object  sKinvalid_variable ; 
>    -EXTER object  sKundefined_function ; 
>    -EXTER object  sKinvalid_function ; 
>    -EXTER object  sKpackage_error ; 
>    -EXTER object  sKcatch ; 
>    -EXTER object  sKprotect ; 
>    -EXTER object  sKcatchall ; 
>    -EXTER  object   fLget_universal_time   (void) ; 
>    -EXTER  object   fLget_internal_real_time   (void) ; 
>    -EXTER object  sSAdefault_time_zoneA ; 
>    -EXTER  object   fSgetpid   (void) ; 
>    -EXTER  object   fSuse_fast_links   (object flag,...) ; 
>    -EXTER object  sScdefn ; 
>    -EXTER object  sLAlink_arrayA ; 
>    -EXTER  object   fSprofile   (object start_address,object scale) ; 
>    -EXTER  object   fSfunction_start   (object funobj) ; 
>    -EXTER  object   fSset_up_combined   (object first,...) ; 
>    -EXTER  object   fSdisplay_profile   (object start_addr,object scal) ; 
>    -EXTER  object   fSarray_adress   (object array) ; 
>    -EXTER object  sSAprofile_arrayA ; 
>    -EXTER object  sSAinterrupt_enableA ; 
>    -EXTER object  sSsigusr1_interrupt ; 
>    -EXTER object  sSsigio_interrupt ; 
>    -EXTER  object   sSsignal_safety_required   (fixnum signo,fixnum safety) ; 
>    -EXTER  object   fSallow_signal   (fixnum n) ; 
>    -EXTER  object   fSinitfun   
>    -      (object sym,object addr_ind,object argd,...) ; 
>    -EXTER  object   fSinitmacro   (object first,...) ; 
>    -EXTER  object   fSset_key_struct   (object key_struct_ind) ; 
>    -EXTER  object   fSinvoke   (object x) ; 
>    -EXTER  object   fSopen_named_socket   (fixnum port) ; 
>    -EXTER  object   fSclose_fd   (fixnum fd) ; 
>    -EXTER  object   fSclose_sfd   (object sfd) ; 
>    -EXTER  object   fSaccept_socket_connection   (object named_socket) ; 
>    -EXTER  object   fShostname_to_hostid   (object host) ; 
>    -EXTER  object   fSgethostname   (void) ; 
>    -EXTER  object   fShostid_to_hostname   (object host_id) ; 
>    -EXTER  object   fScheck_fd_for_input   (fixnum fd,fixnum timeout) ; 
>    -EXTER  object   fSclear_connection   (fixnum fd) ; 
>    -EXTER  object   fSconnection_state_fd   (object sfd) ; 
>    -EXTER  object   fSour_write   (object sfd,object buffer,fixnum nbytes) ; 
>    -EXTER  object   fSour_read_with_offset   (object fd,object buffer,fixnum 
> offset,fixnum nbytes,fixnum timeout) ; 
>    -EXTER  object   fSprint_to_string1   (object str,object x,object 
> the_code) ; 
>    -EXTER  object   fSset_sigio_for_fd   (fixnum fd) ; 
>    -EXTER  object   fSreset_string_input_stream   (object strm,object 
> string,fixnum start,fixnum end) ; 
>    -EXTER  object   fScheck_state_input   (object osfd,fixnum timeout) ; 
>    -EXTER  object   fSclear_connection_state   (object osfd) ; 
>    -EXTER  object   fSgetpeername   (object sock) ; 
>    -EXTER  object   fSgetsockname   (object sock) ; 
>    -EXTER  object   fSset_blocking   (object sock,object setBlocking) ; 
>    +EXTER object fLbye (fixnum exitc);
>    +EXTER object fLquit (fixnum exitc);
>    +EXTER object fLexit (fixnum exitc);
>    +EXTER object sSAno_initA;
>    +EXTER object fLidentity (object x0);
>    +EXTER object fLlisp_implementation_version (void);
>    +EXTER object sSAlisp_maxpagesA;
>    +EXTER object sSAsystem_directoryA;
>    +EXTER object sSAmultiply_stacksA;
>    +EXTER object sStop_level;
>    +EXTER object sSAcommand_argsA;
>    +EXTER object sSAafter_gbc_hookA;
>    +EXTER object sSAignore_maximum_pagesA;
>    +EXTER object fSallocated (object typ);
>    +EXTER object fSreset_number_used (object typ);
>    +EXTER object fSstaticp (object x);
>    +EXTER object fSallocate (object type,fixnum npages,...);
>    +EXTER object fSallocate_sgc (object type,fixnum min,fixnum max,fixnum 
> free_percent);
>    +EXTER object fSallocate_growth (object type,fixnum min,fixnum max,fixnum 
> percent,fixnum percent_free);
>    +EXTER object fSallocate_contiguous_pages (fixnum npages,...);
>    +EXTER object fSallocated_contiguous_pages (void);
>    +EXTER object fSmaximum_contiguous_pages (void);
>    +EXTER object fSallocate_relocatable_pages (fixnum npages,...);
>    +EXTER object fSallocated_relocatable_pages (void);
>    +EXTER object fSget_hole_size (void);
>    +EXTER object fSset_hole_size (fixnum npages,...);
>    +EXTER object fLgbc (object x0);
>    +EXTER object sSAnotify_gbcA;
>    +EXTER object sSAgbc_messageA;
>    +EXTER object sLcommon;
>    +EXTER object sLnull;
>    +EXTER object sLcons;
>    +EXTER object sLlist;
>    +EXTER object sLsymbol;
>    +EXTER object sLarray;
>    +EXTER object sLvector;
>    +EXTER object sLbit_vector;
>    +EXTER object sLstring;
>    +EXTER object sLsequence;
>    +EXTER object sLsimple_array;
>    +EXTER object sLsimple_vector;
>    +EXTER object sLsimple_bit_vector;
>    +EXTER object sLsimple_string;
>    +EXTER object sLfunction;
>    +EXTER object sLcompiled_function;
>    +EXTER object sLpathname;
>    +EXTER object sLcharacter;
>    +EXTER object sLnumber;
>    +EXTER object sLrational;
>    +EXTER object sLfloat;
>    +EXTER object sLstring_char;
>    +EXTER object sLinteger;
>    +EXTER object sLratio;
>    +EXTER object sLshort_float;
>    +EXTER object sLstandard_char;
>    +EXTER object sLboolean;
>    +EXTER object sLfixnum;
>    +EXTER object sLpositive_fixnum;
>    +EXTER object sLcomplex;
>    +EXTER object sLsingle_float;
>    +EXTER object sLpackage;
>    +EXTER object sLbignum;
>    +EXTER object sLrandom_state;
>    +EXTER object sLdouble_float;
>    +EXTER object sLstream;
>    +EXTER object sLbit;
>    +EXTER object sLreadtable;
>    +EXTER object sLlong_float;
>    +EXTER object sLhash_table;
>    +EXTER object sLkeyword;
>    +EXTER object sLstructure;
>    +EXTER object sLsatisfies;
>    +EXTER object sLmember;
>    +EXTER object sLnot;
>    +EXTER object sLor;
>    +EXTER object sLand;
>    +EXTER object sLvalues;
>    +EXTER object sLmod;
>    +EXTER object sLsigned_byte;
>    +EXTER object sLunsigned_byte;
>    +EXTER object sLsigned_char;
>    +EXTER object sLunsigned_char;
>    +EXTER object sLsigned_short;
>    +EXTER object sLunsigned_short;
>    +EXTER object sLA;
>    +EXTER object sLplusp;
>    +EXTER object sSchar_size;
>    +EXTER object sSshort_size;
>    +EXTER object fLfuncall (object fun,...);
>    +EXTER object fLapply (object fun,...);
>    +EXTER object fLeval (object x0);
>    +EXTER object fLconstantp (object x0);
>    +EXTER object sSlambda_block_expanded;
>    +EXTER object sSAbreak_pointsA;
>    +EXTER object sSAbreak_stepA;
>    +EXTER object fLmacroexpand (object form,...);
>    +EXTER object sLfuncall;
>    +EXTER object sLAmacroexpand_hookA;
>    +EXTER object sSdefmacroA;
>    +EXTER object sSAinhibit_macro_specialA;
>    +EXTER object fLnot (object x0);
>    +EXTER object fLnot (object x0);
>    +EXTER object fLsymbolp (object x0);
>    +EXTER object fLatom (object x0);
>    +EXTER object fLconsp (object x0);
>    +EXTER object fLlistp (object x0);
>    +EXTER object fLnumberp (object x0);
>    +EXTER object fLintegerp (object x0);
>    +EXTER object fLrationalp (object x0);
>    +EXTER object fLrealp (object x0);
>    +EXTER object fLfloatp (object x0);
>    +EXTER object fLcomplexp (object x0);
>    +EXTER object fLcharacterp (object x0);
>    +EXTER object fLstringp (object x0);
>    +EXTER object fLbit_vector_p (object x0);
>    +EXTER object fLvectorp (object x0);
>    +EXTER object fLsimple_string_p (object x0);
>    +EXTER object fLsimple_bit_vector_p (object x0);
>    +EXTER object fLsimple_vector_p (object x0);
>    +EXTER object fLarrayp (object x0);
>    +EXTER object fLpackagep (object x0);
>    +EXTER object fLfunctionp (object x0);
>    +EXTER object fLcompiled_function_p (object x0);
>    +EXTER object fLcommonp (object x0);
>    +EXTER object fLeq (object x0,object x1);
>    +EXTER object fLeql (object x0,object x1);
>    +EXTER object fLequal (object x0,object x1);
>    +EXTER object fLequalp (object x0,object x1);
>    +EXTER object fScontains_sharp_comma (object x0);
>    +EXTER object fSspicep (object x0);
>    +EXTER object fSfixnump (object x0);
>    +EXTER object fLset (object symbol,object value);
>    +EXTER object fSfset (object sym,object function);
>    +EXTER object fLmakunbound (object sym);
>    +EXTER object fLfmakunbound (object sym);
>    +EXTER object sSclear_compiler_properties;
>    +EXTER object fSclear_compiler_properties (object x0,object x1);
>    +EXTER object sLaref;
>    +EXTER object sLcar;
>    +EXTER object sLcdr;
>    +EXTER object sLchar;
>    +EXTER object sLdecf;
>    +EXTER object sLelt;
>    +EXTER object sLfill_pointer;
>    +EXTER object sLget;
>    +EXTER object sLgetf;
>    +EXTER object sLgethash;
>    +EXTER object sLincf;
>    +EXTER object sLpop;
>    +EXTER object sLpush;
>    +EXTER object sLschar;
>    +EXTER object sLsetf;
>    +EXTER object sSsetf_lambda;
>    +EXTER object sSstructure_access;
>    +EXTER object sLsvref;
>    +EXTER object sStraced;
>    +EXTER object sLvector;
>    +EXTER object sKallow_other_keys;
>    +EXTER object fSerror_set (volatile object x0);
>    +EXTER object sLgensym_counter;
>    +EXTER object fSmc (object name,object address);
>    +EXTER object fSmfsfun (object name,object address,object argd);
>    +EXTER object fSmfvfun (object name,object address,object argd);
>    +EXTER object fSmfvfun_key (object symbol,object address,object 
> argd,object keys);
>    +EXTER object fSmf (object name,object addr);
>    +EXTER object fSmm (object name,object addr);
>    +EXTER object fScompiled_function_name (object fun);
>    +EXTER object fSturbo_closure (object funobj);
>    +EXTER object fSspecialp (object sym);
>    +EXTER object sSdebug;
>    +EXTER object fSdefvar1 (object sym,object val,...);
>    +EXTER object fSdebug (object sym,object val);
>    +EXTER object fSsetvv (object index,object val);
>    +EXTER object sSPmemory;
>    +EXTER object sSPinit;
>    +EXTER object fSinit_cmp_anon (void);
>    +EXTER object sKexternal;
>    +EXTER object sKinherited;
>    +EXTER object sKinternal;
>    +EXTER object sKnicknames;
>    +EXTER object sKuse;
>    +EXTER object sLApackageA;
>    +EXTER object fSset_gmp_allocate_relocatable (object flag);
>    +EXTER object fSallocate_bigger_fixnum_range (fixnum min,fixnum max);
>    +EXTER object fScmod (object num);
>    +EXTER object fScplus (object x0,object x1);
>    +EXTER object fSctimes (object x0,object x1);
>    +EXTER object fScdifference (object x0,object x1);
>    +EXTER object fLnth (fixnum index,object list);
>    +EXTER object fLfirst (object x);
>    +EXTER object fLsecond (object x);
>    +EXTER object fLthird (object x);
>    +EXTER object fLfourth (object x);
>    +EXTER object fLfifth (object x);
>    +EXTER object fLsixth (object x);
>    +EXTER object fLseventh (object x);
>    +EXTER object fLeighth (object x);
>    +EXTER object fLninth (object x);
>    +EXTER object fLtenth (object x);
>    +EXTER object fSnext_hash_table_entry (object table,object ind);
>    +EXTER object fLhash_table_test (object table);
>    +EXTER object fLhash_table_size (object table);
>    +EXTER object sLarray_rank_limit;
>    +EXTER object sLarray_dimension_limit;
>    +EXTER object sLarray_total_size_limit;
>    +EXTER object sLbit;
>    +EXTER object fLaref (object x,fixnum i, ...);
>    +EXTER object fLsvref (object x,ufixnum i);
>    +EXTER object fLrow_major_aref (object x,fixnum i);
>    +EXTER object fSaset1 (object x, fixnum i,object val);
>    +EXTER object fSaset (object x,fixnum i,object y, ...);
>    +EXTER object fSsvset (object x,fixnum i,object val);
>    +EXTER object fSmake_vector1 (fixnum n,fixnum elt_type,object staticp,...);
>    +EXTER object fSget_aelttype (object x);
>    +EXTER object fSmake_vector (object x0,object x1,object x2,object 
> x3,object x4,object x5,object x6,...);
>    +EXTER object fSmake_array1 (fixnum elt_type,object staticp,object 
> initial_element,object displaced_to,fixnum displaced_index_offset, object 
> dimensions);
>    +EXTER object fScopy_array_portion (object x,object y,fixnum i1,fixnum 
> i2,object n1o);
>    +EXTER object fSfill_pointer_set (object x,fixnum i);
>    +EXTER object fLfill_pointer (object x);
>    +EXTER object fLarray_has_fill_pointer_p (object x);
>    +EXTER object fLarray_element_type (object x);
>    +EXTER object fLadjustable_array_p (object x);
>    +EXTER object fSdisplaced_array_p (object x);
>    +EXTER object fLarray_rank (object x);
>    +EXTER object fLarray_dimension (object x,fixnum i);
>    +EXTER object fSreplace_array (object old,object new);
>    +EXTER object fLarray_total_size (object x);
>    +EXTER object fSaset_by_cursor (object array,object val,object cursor);
>    +EXTER object sSAmatch_dataA;
>    +EXTER object sSAcase_fold_searchA;
>    +EXTER object fSmatch_beginning (fixnum i);
>    +EXTER object fSmatch_end (fixnum i);
>    +EXTER object fSstring_match (object pattern,object string,...);
>    +EXTER object sSs_data;
>    +EXTER object sLcompile;
>    +EXTER object sLdeclare;
>    +EXTER object sLeval;
>    +EXTER object sLeval;
>    +EXTER object sSfunction_documentation;
>    +EXTER object sLload;
>    +EXTER object sLprogn;
>    +EXTER object sLtypep;
>    +EXTER object sLvalues;
>    +EXTER object sSvariable_documentation;
>    +EXTER object sLwarn;
>    +EXTER object sSAallow_gzipped_fileA;
>    +EXTER object sKmyaddr;
>    +EXTER object sKmyport;
>    +EXTER object sKasync;
>    +EXTER object sKhost;
>    +EXTER object sKserver;
>    +EXTER object sSsocket;
>    +EXTER object sLAstandard_inputA;
>    +EXTER object sLAstandard_outputA;
>    +EXTER object sLAerror_outputA;
>    +EXTER object sLAterminal_ioA;
>    +EXTER object sLAquery_ioA;
>    +EXTER object sLAdebug_ioA;
>    +EXTER object sLAtrace_outputA;
>    +EXTER object sSAignore_eof_on_terminal_ioA;
>    +EXTER object sSAload_pathnameA;
>    +EXTER object sLAload_verboseA;
>    +EXTER object sKabort;
>    +EXTER object sKappend;
>    +EXTER object sKcreate;
>    +EXTER object sKdefault;
>    +EXTER object sKdirection;
>    +EXTER object sKelement_type;
>    +EXTER object sKerror;
>    +EXTER object sKif_does_not_exist;
>    +EXTER object sKif_exists;
>    +EXTER object sKinput;
>    +EXTER object sKio;
>    +EXTER object sKnew_version;
>    +EXTER object sKoutput;
>    +EXTER object sKoverwrite;
>    +EXTER object sKprint;
>    +EXTER object sKprobe;
>    +EXTER object sKrename;
>    +EXTER object sKrename_and_delete;
>    +EXTER object sKset_default_pathname;
>    +EXTER object sKsupersede;
>    +EXTER object sKverbose;
>    +EXTER object sLAread_default_float_formatA;
>    +EXTER object sLAread_baseA;
>    +EXTER object sLAread_suppressA;
>    +EXTER object sSY;
>    +EXTER object sSYB;
>    +EXTER object sSYZ;
>    +EXTER object sLlistA;
>    +EXTER object sLappend;
>    +EXTER object sLnconc;
>    +EXTER object sLapply;
>    +EXTER object sLvector;
>    +EXTER object sKupcase;
>    +EXTER object sKdowncase;
>    +EXTER object sKcapitalize;
>    +EXTER object sKstream;
>    +EXTER object sKescape;
>    +EXTER object sKreadably;
>    +EXTER object sKpretty;
>    +EXTER object sKcircle;
>    +EXTER object sKbase;
>    +EXTER object sKradix;
>    +EXTER object sKcase;
>    +EXTER object sKgensym;
>    +EXTER object sKlevel;
>    +EXTER object sKlength;
>    +EXTER object sKarray;
>    +EXTER object sLAprint_escapeA;
>    +EXTER object sLAprint_readablyA;
>    +EXTER object sLAprint_prettyA;
>    +EXTER object sLAprint_circleA;
>    +EXTER object sLAprint_baseA;
>    +EXTER object sLAprint_radixA;
>    +EXTER object sLAprint_caseA;
>    +EXTER object sLAprint_gensymA;
>    +EXTER object sLAprint_levelA;
>    +EXTER object sLAprint_lengthA;
>    +EXTER object sLAprint_arrayA;
>    +EXTER object sSAprint_packageA;
>    +EXTER object sSAprint_structureA;
>    +EXTER object sSpretty_print_format;
>    +EXTER object sSAprint_nansA;
>    +EXTER object fLformat (object strm, object control,...);
>    +EXTER object sSAindent_formatted_outputA;
>    +EXTER object fSsetenv (object variable,object value);
>    +EXTER object fLdelete_file (object path);
>    +EXTER object fLerror (object fmt_string,...);
>    +EXTER object fLspecific_error (object error_name,object fmt_string,...);
>    +EXTER object fLspecific_correctable_error (object error_name,object 
> fmt_string,...);
>    +EXTER object fLcerror (object continue_fmt_string,object fmt_string,...);
>    +EXTER object fSihs_top (void);
>    +EXTER object fSihs_fun (object x0);
>    +EXTER object fSihs_vs (object x0);
>    +EXTER object fSfrs_top (void);
>    +EXTER object fSfrs_vs (object x0);
>    +EXTER object fSfrs_bds (object x0);
>    +EXTER object fSfrs_class (object x0);
>    +EXTER object fSfrs_tag (object x0);
>    +EXTER object fSfrs_ihs (object x0);
>    +EXTER object fSbds_top (void);
>    +EXTER object fSbds_var (object x0);
>    +EXTER object fSbds_val (object x0);
>    +EXTER object fSvs_top (void);
>    +EXTER object fSvs (object x0);
>    +EXTER object fSsch_frs_base (object x0,object x1);
>    +EXTER object fSinternal_super_go (object tag,object x1,object x2);
>    +EXTER object sSuniversal_error_handler;
>    +EXTER object fSuniversal_error_handler (object x0,object x1,object 
> x2,object x3,object error_fmt_string);
>    +EXTER object sSterminal_interrupt;
>    +EXTER object sKwrong_type_argument;
>    +EXTER object sKtoo_few_arguments;
>    +EXTER object sKtoo_many_arguments;
>    +EXTER object sKunexpected_keyword;
>    +EXTER object sKinvalid_form;
>    +EXTER object sKunbound_variable;
>    +EXTER object sKinvalid_variable;
>    +EXTER object sKundefined_function;
>    +EXTER object sKinvalid_function;
>    +EXTER object sKpackage_error;
>    +EXTER object sKcatch;
>    +EXTER object sKprotect;
>    +EXTER object sKcatchall;
>    +EXTER object fLget_universal_time (void);
>    +EXTER object fLget_internal_real_time (void);
>    +EXTER object sSAdefault_time_zoneA;
>    +EXTER object fSgetpid (void);
>    +EXTER object fSuse_fast_links (object flag,...);
>    +EXTER object sScdefn;
>    +EXTER object sLAlink_arrayA;
>    +EXTER object fSprofile (object start_address,object scale);
>    +EXTER object fSfunction_start (object funobj);
>    +EXTER object fSset_up_combined (object first,...);
>    +EXTER object fSdisplay_profile (object start_addr,object scal);
>    +EXTER object fSarray_adress (object array);
>    +EXTER object sSAprofile_arrayA;
>    +EXTER object sSAinterrupt_enableA;
>    +EXTER object sSsigusr1_interrupt;
>    +EXTER object sSsigio_interrupt;
>    +EXTER object sSsignal_safety_required (fixnum signo,fixnum safety);
>    +EXTER object fSallow_signal (fixnum n);
>    +EXTER object fSinitfun (object sym,object addr_ind,object argd,...);
>    +EXTER object fSinitmacro (object first,...);
>    +EXTER object fSset_key_struct (object key_struct_ind);
>    +EXTER object fSinvoke (object x);
>    +EXTER object fSopen_named_socket (fixnum port);
>    +EXTER object fSclose_fd (fixnum fd);
>    +EXTER object fSclose_sfd (object sfd);
>    +EXTER object fSaccept_socket_connection (object named_socket);
>    +EXTER object fShostname_to_hostid (object host);
>    +EXTER object fSgethostname (void);
>    +EXTER object fShostid_to_hostname (object host_id);
>    +EXTER object fScheck_fd_for_input (fixnum fd,fixnum timeout);
>    +EXTER object fSclear_connection (fixnum fd);
>    +EXTER object fSconnection_state_fd (object sfd);
>    +EXTER object fSour_write (object sfd,object buffer,fixnum nbytes);
>    +EXTER object fSour_read_with_offset (object fd,object buffer,fixnum 
> offset,fixnum nbytes,fixnum timeout);
>    +EXTER object fSprint_to_string1 (object str,object x,object the_code);
>    +EXTER object fSset_sigio_for_fd (fixnum fd);
>    +EXTER object fSreset_string_input_stream (object strm,object 
> string,fixnum start,fixnum end);
>    +EXTER object fScheck_state_input (object osfd,fixnum timeout);
>    +EXTER object fSclear_connection_state (object osfd);
>    +EXTER object fSgetpeername (object sock);
>    +EXTER object fSgetsockname (object sock);
>    +EXTER object fSset_blocking (object sock,object setBlocking);
>    Index: h/object.h
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/h/object.h,v
>    retrieving revision 1.18.4.1
>    diff -u -r1.18.4.1 object.h
>    --- h/object.h     16 Jul 2003 02:02:49 -0000      1.18.4.1
>    +++ h/object.h     29 Aug 2003 20:38:48 -0000
>    @@ -759,6 +759,7 @@
>          short   tm_max_grow;    /* max amount to grow when growing */
>          short   tm_growth_percent;  /* percent to increase maxpages */
>          short   tm_percent_free;  /* percent which must be free after a gc 
> for this type */
>    +        short   tm_distinct;       /* pages of this type are distinct */
> 
>     };
> 
>    @@ -783,6 +784,20 @@
>          The pointer to the contiguous blocks.
>     */
>     EXTER struct contblock *cb_pointer;       /*  contblock pointer  */
>    +
>    +/* SGC cont pages: After SGC_start, old_cb_pointer will be a linked
>    +   list of free blocks on non-SGC pages, and cb_pointer will be
>    +   likewise for SGC pages.  CM 20030827*/
>    +EXTER struct contblock *old_cb_pointer;   /*  old contblock pointer when 
> in SGC  */
>    +
>    +/* SGC cont pages: FIXME -- at some point, enable runtime disabling of
>    +   SGC cont pages.  Right now, the tm_sgc variable for type contiguous
>    +   will govern only the possible attempt to get new pages for SGC.
>    +   Contiguous pages normally allocated when SGC is on will always be
>    +   marked with SGC_PAGE_FLAG, as the current GBC algorithm always uses
>    +   sgc_contblock_sweep_phase in this case. */
>    +/* #define SGC_CONT_ENABLED (sgc_enabled && 
> tm_table[t_contiguous].tm_sgc) */
>    +#define SGC_CONT_ENABLED (sgc_enabled)
> 
>     /*
>          Variables for memory management.
>    Index: h/page.h
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/h/page.h,v
>    retrieving revision 1.4.4.1
>    diff -u -r1.4.4.1 page.h
>    --- h/page.h       21 Aug 2003 04:17:47 -0000      1.4.4.1
>    +++ h/page.h       29 Aug 2003 20:38:48 -0000
>    @@ -29,6 +29,12 @@
>     #define ROUND_UP_PTR(n)   (((long)(n) + (PTR_ALIGN-1)) & ~(PTR_ALIGN-1))
>     #define ROUND_DOWN_PTR(n) (((long)(n)  & ~(PTR_ALIGN-1)))
> 
>    +/* alignment required for contiguous pointers */
>    +#define CPTR_ALIGN (PTR_ALIGN < sizeof(struct contblock) ? sizeof(struct 
> contblock) : PTR_ALIGN)
>    +
>    +#define ROUND_UP_PTR_CONT(n)      (((long)(n) + (CPTR_ALIGN-1)) & 
> ~(CPTR_ALIGN-1))
>    +#define ROUND_DOWN_PTR_CONT(n) (((long)(n)  & ~(CPTR_ALIGN-1)))
>    +
> 
>     #ifdef SGC
> 
>    Index: h/protoize.h
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/h/protoize.h,v
>    retrieving revision 1.26.4.1
>    diff -u -r1.26.4.1 protoize.h
>    --- h/protoize.h   16 Jul 2003 02:02:49 -0000      1.26.4.1
>    +++ h/protoize.h   29 Aug 2003 20:38:48 -0000
>    @@ -7,6 +7,7 @@
>     /* alloc.c:376:OF */ extern object fSallocated (object typ); /* (typ) 
> object typ; */
>     /* alloc.c:401:OF */ extern object fSreset_number_used (object typ); /* 
> (typ) object typ; */
>     /* alloc.c:480:OF */ extern void insert_contblock (char *p, int s); /* 
> (p, s) char *p; int s; */
>    +/* alloc.c:480:OF */ extern void insert_maybe_sgc_contblock (char *p, int 
> s); /* (p, s) char *p; int s; */
>     /* alloc.c:611:OF */ extern void set_maxpage (void); /* () */
>     /* alloc.c:635:OF */ extern void init_alloc (void); /* () */
>     /* alloc.c:737:OF */ extern object fSstaticp (object x); /* (x) object x; 
> */
>    Index: o/alloc.c
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/alloc.c,v
>    retrieving revision 1.19
>    diff -u -r1.19 alloc.c
>    --- o/alloc.c      1 Mar 2003 22:37:37 -0000       1.19
>    +++ o/alloc.c      29 Aug 2003 20:39:00 -0000
>    @@ -425,9 +425,19 @@
>     /*
>          printf("allocating %d-byte contiguous block...\n", n);
>     */
>    +   /* SGC cont pages: contiguous pointers must be aligned at
>    +      CPTR_ALIGN, no smaller than sizeof (struct contblock).
>    +      Here we allocate a bigger block, and rely on the fact that
>    +      allocate_page returns pointers appropriately aligned,
>    +      being also aligned on page boundaries.  Protection against
>    +      a too small contblock was aforded before by a minimum
>    +      contblock size enforced by CBMINSIZE in insert_contblock.
>    +      However, this leads to a leak when many small cont blocks
>    +      are allocated, e.g. with bignums, so is now removed.  CM
>    +      20030827 */
> 
>          g = FALSE;
>    -  n = ROUND_UP_PTR(n);
>    +  n = ROUND_UP_PTR_CONT(n);
> 
>     ONCE_MORE:
>           CHECK_INTERRUPT;
>    @@ -472,31 +482,87 @@
>         }
>          p = alloc_page(m);
> 
>    -  for (i = 0;  i < m;  i++)
>    +  for (i = 0;  i < m;  i++) {
>                  type_map[page(p) + i] = (char)t_contiguous;
>    +
>    +          /* SGC cont pages: Before this point, GCL never marked 
> contiguous
>    +             pages for SGC, causing no contiguous pages to be
>    +             swept when SGC was on.  Here we follow the behavior
>    +             for other pages in add_to_freelist. CM 20030827  */
>    +          if (SGC_CONT_ENABLED)
>    +            sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    +  }
>          ncbpage += m;
>          insert_contblock(p+n, PAGESIZE*m - n);
>          return(p);
>     }
> 
>    +/* SGC cont pages: explicit free calls can come at any time, and we
>    +   must make sure to add the newly deallocated block to the right
>    +   list.  CM 20030827*/
>    +void
>    +insert_maybe_sgc_contblock(char *p,int s) {
>    +
>    +  struct contblock *tmp_cb_pointer;
>    +
>    +  if (SGC_CONT_ENABLED && ! SGC_PAGE_P(page(p))) {
>    +    tmp_cb_pointer=cb_pointer;
>    +    cb_pointer=old_cb_pointer;
>    +    sgc_enabled=0;
>    +    insert_contblock(p,s);
>    +    sgc_enabled=1;
>    +    old_cb_pointer=cb_pointer;
>    +    cb_pointer=tmp_cb_pointer;
>    +  } else
>    +    insert_contblock(p,s);
>    +
>    +}
>    +
>    +#ifdef SGC_CONT_DEBUG
>    +extern void overlap_check(struct contblock *,struct contblock *);
>    +#endif
>    +
>     void
>     insert_contblock(char *p, int s) {
> 
>       struct contblock **cbpp, *cbp;
> 
>    -  if (s < CBMINSIZE)
>    +  /* SGC cont pages: This used to return when s<CBMINSIZE, but we need
>    +     to be able to sweep small (e.g. bignum) contblocks.  FIXME:
>    +     should never be called with s<=0 to begin with.  CM 20030827*/
>    +  if (s<=0)
>       return;
>       ncb++;
>       cbp = (struct contblock *)p;
>    -  cbp->cb_size = s;
>    +  /* SGC cont pages: allocated sizes may not be zero mod CPTR_SIZE,
>    +     e.g. string fillp, but alloc_contblock rounded up the allocation
>    +     like this, which we follow here.  CM 20030827 */
>    +  cbp->cb_size = ROUND_UP_PTR_CONT(s);
>       for (cbpp = &cb_pointer;  *cbpp;  cbpp = &((*cbpp)->cb_link))
>       if ((*cbpp)->cb_size >= s) {
>    +#ifdef SGC_CONT_DEBUG
>    +      if (*cbpp==cbp) {
>    +  fprintf(stderr,"Trying to install a circle at %p\n",cbp);
>    +  exit(1);
>    +      }
>    +      if (sgc_enabled) 
>    +  overlap_check(old_cb_pointer,cb_pointer);
>    +      
>    +#endif
>         cbp->cb_link = *cbpp;
>         *cbpp = cbp;
>    +#ifdef SGC_CONT_DEBUG
>    +      if (sgc_enabled) 
>    +  overlap_check(old_cb_pointer,cb_pointer);
>    +#endif
>         return;
>       }
>       cbp->cb_link = NULL;
>       *cbpp = cbp;
>    +#ifdef SGC_CONT_DEBUG
>    +  if (sgc_enabled) 
>    +    overlap_check(old_cb_pointer,cb_pointer);
>    +#endif
> 
>     }
> 
>    @@ -568,19 +634,30 @@
>          return(p);
>     }
> 
>    +/* Add a tm_distinct field to prevent page type sharing if desired.
>    +   Not used now, as its never desirable from an efficiency point of
>    +   view, and as the only known place one must separate is cons and
>    +   fixnum, which are of different sizes unless PTR_ALIGN is set too
>    +   high (e.g. 16 on a 32bit machine).  See the ordering of init_tm
>    +   calls for these types below -- reversing would wind up merging the
>    +   types with the current algorithm.  CM 20030827 */
>    +
>     static void
>    -init_tm(enum type t, char *name, int elsize, int nelts, int sgc) {
>    +init_tm(enum type t, char *name, int elsize, int nelts, int sgc,int 
> distinct) {
> 
>       int i, j;
>       int maxpage;
>       /* round up to next number of pages */
>       maxpage = (((nelts * elsize) + PAGESIZE -1)/PAGESIZE);
>       tm_table[(int)t].tm_name = name;
>    -  for (j = -1, i = 0;  i < (int)t_end;  i++)
>    -    if (tm_table[i].tm_size != 0 &&
>    -  tm_table[i].tm_size >= elsize &&
>    -  (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    -      j = i;
>    +  j=-1;
>    +  if (!distinct)
>    +    for (i = 0;  i < (int)t_end;  i++)
>    +      if (tm_table[i].tm_size != 0 &&
>    +    tm_table[i].tm_size >= elsize &&
>    +    !tm_table[i].tm_distinct &&
>    +    (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    +  j = i;
>       if (j >= 0) {
>       tm_table[(int)t].tm_type = (enum type)j;
>       tm_table[j].tm_maxpage += maxpage;
>    @@ -598,6 +675,7 @@
>       /*tm_table[(int)t].tm_npage = 0; */  /* dont zero nrbpage.. */
>       tm_table[(int)t].tm_maxpage = maxpage;
>       tm_table[(int)t].tm_gbccount = 0;
>    +  tm_table[(int)t].tm_distinct=distinct;
>     #ifdef SGC        
>       tm_table[(int)t].tm_sgc = sgc;
>       tm_table[(int)t].tm_sgc_max = 3000;
>    @@ -688,40 +766,46 @@
>       for (i = 0;  i < MAXPAGE;  i++)
>       type_map[i] = (char)t_other;
> 
>    +  /* Unused (at present) tm_distinct flag added.  Note that if cons
>    +     and fixnum share page types, errors will be introduced.
>    +
>    +     Gave each page type at least some sgc pages by default.  Of
>    +     course changeable by allocate-sgc.  CM 20030827 */
>    +
>       init_tm(t_fixnum, "NFIXNUM",
>    -    sizeof(struct fixnum_struct), 8192,20);
>    -  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50 );
>    -  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 5461,0 );
>    -  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,0  );
>    -  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,0 );
>    -  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1  );
>    -  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1 );
>    -  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1 );
>    -  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,0 );
>    -  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,0 );
>    +    sizeof(struct fixnum_struct), 8192,20,0);
>    +  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50,0 );
>    +  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 5461,1,0 );
>    +  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,1,0  );
>    +  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,1,0 );
>    +  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1,0  );
>    +  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1,0 );
>    +  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1,0 );
>    +  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,1,0 );
>    +  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,1,0 );
>       init_tm(t_shortfloat, "FSHORT-FLOAT",
>    -    sizeof(struct shortfloat_struct), 256 ,1);
>    +    sizeof(struct shortfloat_struct), 256 ,1,0);
>       init_tm(t_longfloat, "LLONG-FLOAT",
>    -    sizeof(struct longfloat_struct), 170 ,0);
>    -  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 ,0);
>    -  init_tm(t_character,"#CHARACTER",sizeof(struct character), 256 ,0);
>    -  init_tm(t_package, ":PACKAGE", sizeof(struct package), 2*PAGESIZE / 
> sizeof(struct package),0);
>    -  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 78,0 );
>    -  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,0);
>    -  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 73 ,0);
>    -  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,0);
>    -  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 ,0);
>    -  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 256 ,0);
>    -  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 ,0);
>    -  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 ,0);
>    -  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 ,0);
>    -  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,0);
>    -  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,0);
>    -  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,0);
>    -  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,0);
>    -  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,0);
>    -  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20);
>    -  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20);
>    +    sizeof(struct longfloat_struct), 170 ,1,0);
>    +  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 ,1,0);
>    +  init_tm(t_character,"#CHARACTER",sizeof(struct character), 256 ,1,0);
>    +  init_tm(t_package, ":PACKAGE", sizeof(struct package), 2*PAGESIZE / 
> sizeof(struct package),1,0);
>    +  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 78,1,0 );
>    +  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,1,0);
>    +  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 73 ,1,0);
>    +  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,1,0);
>    +  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 ,1,0);
>    +  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 256 ,1,0);
>    +  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 ,1,0);
>    +  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 ,1,0);
>    +  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 ,1,0);
>    +  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,1,0);
>    +  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,1,0);
>    +  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,1,0);
>    +  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,1,0);
>    +  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,1,0);
>    +  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20,0);
>    +  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20,0);
>       tm_table[t_relocatable].tm_nppage = PAGESIZE;
>       tm_table[t_contiguous].tm_nppage = PAGESIZE;
> 
>    @@ -895,8 +979,15 @@
>       FEerror("Can't allocate ~D pages for contiguous blocks.",
>              1, make_fixnum(npages));
> 
>    -  for (i = 0;  i < m;  i++)
>    +  for (i = 0;  i < m;  i++) {
>       type_map[page(p + PAGESIZE*i)] = (char)t_contiguous;
>    +    /* SGC cont pages: Before this point, GCL never marked contiguous
>    +       pages for SGC, causing no contiguous pages to be
>    +       swept when SGC was on.  Here we follow the behavior
>    +       for other pages in add_to_freelist. CM 20030827  */
>    +    if (SGC_CONT_ENABLED)
>    +      sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    +  }
> 
>       ncbpage += m;
>       insert_contblock(p, PAGESIZE*m);
>    @@ -1140,8 +1231,9 @@
>     #endif    
>          for (p = &malloc_list; *p && !endp(*p);  p = &((*p)->c.c_cdr))
>                  if ((*p)->c.c_car->st.st_self == ptr) {
>    -                  insert_contblock((*p)->c.c_car->st.st_self,
>    -                                   (*p)->c.c_car->st.st_dim);
>    +/* SGC contblock pages: Its possible this is on an old page CM 20030827 */
>    +                  insert_maybe_sgc_contblock((*p)->c.c_car->st.st_self,
>    +                                             (*p)->c.c_car->st.st_dim);
>                          (*p)->c.c_car->st.st_self = NULL;
>                          *p = (*p)->c.c_cdr;
>                          return ;
>    @@ -1189,7 +1281,8 @@
>          x->st.st_fillp = x->st.st_dim = size;
>          for (i = 0;  i < size;  i++)
>            x->st.st_self[i] = ((char *)ptr)[i];
>    -  insert_contblock(ptr, j);
>    +/* SGC contblock pages: Its possible this is on an old page CM 20030827 */
>    +  insert_maybe_sgc_contblock(ptr, j);
>          return(x->st.st_self);
>         }
>       }
>    Index: o/external_funs.h
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/external_funs.h,v
>    retrieving revision 1.2
>    diff -u -r1.2 external_funs.h
>    --- o/external_funs.h      15 Feb 2003 00:38:28 -0000      1.2
>    +++ o/external_funs.h      29 Aug 2003 20:39:00 -0000
>    @@ -17,6 +17,7 @@
>     extern object fSallocated GPR((object typ));;  
>     extern char *alloc_contblock GPR((int n));;  
>     extern int insert_contblock GPR((char *p, int s));;  
>    +extern int insert_maybe_sgc_contblock GPR((char *p, int s));;  
>     extern char *alloc_relblock GPR((int n));;  
>     extern int init_tm GPR((enum type t, char *name, int elsize, int nelts, 
> int sgc));;  
>     extern int set_maxpage GPR((void));;  
>    Index: o/file.d
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/file.d,v
>    retrieving revision 1.21
>    diff -u -r1.21 file.d
>    --- o/file.d       18 Feb 2003 02:32:03 -0000      1.21
>    +++ o/file.d       29 Aug 2003 20:39:01 -0000
>    @@ -303,11 +303,13 @@
>     deallocate_stream_buffer(strm)
>     object strm;
>     {
>    -  if (strm->sm.sm_buffer)
>    -    {insert_contblock(strm->sm.sm_buffer, BUFSIZ);
>    -     strm->sm.sm_buffer = 0;}
>    - else
>    -    printf("no buffer? %p  \n",strm->sm.sm_fp);
>    +
>    +/* SGC contblock pages: Its possible this is on an old page CM 20030827 */
>    +  if (strm->sm.sm_buffer) 
>    +    {insert_maybe_sgc_contblock(strm->sm.sm_buffer, BUFSIZ); 
>    +    strm->sm.sm_buffer = 0;} 
>    +  else 
>    +    printf("no buffer? %p  \n",strm->sm.sm_fp); 
> 
>     #ifndef FCLOSE_SETBUF_OK
>       strm->sm.sm_fp->_base = NULL;
>    Index: o/gbc.c
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/gbc.c,v
>    retrieving revision 1.13.4.1
>    diff -u -r1.13.4.1 gbc.c
>    --- o/gbc.c        30 Jul 2003 15:11:12 -0000      1.13.4.1
>    +++ o/gbc.c        29 Aug 2003 20:39:01 -0000
>    @@ -1012,19 +1012,24 @@
>       e = pagetochar(j);
>       for (p = s;  p < e;) {
>         if (get_mark_bit((int *)p)) {
>    -  p += PTR_ALIGN;
>    +  /* SGC cont pages: cont blocks must be no smaller than
>    +     sizeof(struct contblock), and must not have a sweep
>    +     granularity greater than this amount (e.g. CPTR_ALIGN) if
>    +     contblock leaks are to be avoided.  Used to be aligned at
>    +     PTR_ALIGN. CM 20030827 */
>    +  p += CPTR_ALIGN;
>          continue;
>         }
>    -      q = p + PTR_ALIGN;
>    +      q = p + CPTR_ALIGN;
>         while (q < e) {
>          if (!get_mark_bit((int *)q)) {
>    -    q += PTR_ALIGN;
>    +    q += CPTR_ALIGN;
>            continue;
>          }
>          break;
>         }
>         insert_contblock(p, q - p);
>    -      p = q + PTR_ALIGN;
>    +      p = q + CPTR_ALIGN;
>       }
>       i = j + 1;
>       }
>    @@ -1067,8 +1072,8 @@
>       if(sgc_enabled) sgc_quit();
> 
>       }
>    -  
>    -  
>    +
>    +
>     #ifdef DEBUG
>       debug = symbol_value(sSAgbc_messageA) != Cnil;
>     #endif
>    @@ -1278,6 +1283,9 @@
> 
>       interrupt_enable = TRUE;
> 
>    +  if (in_sgc && sgc_enabled==0)
>    +    sgc_start();
>    +  
>       if (saving_system) {
>       j = (rb_pointer-rb_start+PAGESIZE-1) / PAGESIZE;
> 
>    @@ -1323,10 +1331,6 @@
>       if (GBC_exit_hook != NULL)
>       (*GBC_exit_hook)();
> 
>    -  
>    -  if (in_sgc && sgc_enabled==0)
>    -    sgc_start();
>    -  
>       if(gc_time>=0 && !--gc_recursive) 
> {gc_time=gc_time+(gc_start=(runtime()-gc_start));}
> 
>       if (sSAnotify_gbcA->s.s_dbind != Cnil) {
>    @@ -1423,8 +1427,10 @@
>       if (!MAYBE_DATA_P(p) || (enum type)type_map[page(p)] != t_contiguous)
>       return;
>       q = p + s;
>    -  x = (int *)ROUND_DOWN_PTR(p);
>    -  y = (int *)ROUND_UP_PTR(q);
>    +  /* SGC cont pages: contblock pages must be no smaller than
>    +     sizeof(struct contblock).  CM 20030827 */
>    +  x = (int *)ROUND_DOWN_PTR_CONT(p);
>    +  y = (int *)ROUND_UP_PTR_CONT(q);
>       for (;  x < y;  x++)
>       set_mark_bit(x);
>     }
>    Index: o/gmp.c
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/gmp.c,v
>    retrieving revision 1.3
>    diff -u -r1.3 gmp.c
>    --- o/gmp.c        15 Feb 2003 00:38:28 -0000      1.3
>    +++ o/gmp.c        29 Aug 2003 20:39:01 -0000
>    @@ -15,7 +15,9 @@
>       old = oldmem;
>       bcopy(MP_SELF(big_gcprotect),new,oldsize);
>       MP_SELF(big_gcprotect)=0;
>    -  if (inheap(oldmem)) insert_contblock(oldmem,oldsize);
>    +/* SGC contblock pages: Its possible this is on an old page CM 20030827 */
>    +  if (inheap(oldmem)) insert_maybe_sgc_contblock(oldmem,oldsize);
>    +
>       return new;
>     }
> 
>    Index: o/sgbc.c
>    ===================================================================
>    RCS file: /cvsroot/gcl/gcl/o/sgbc.c,v
>    retrieving revision 1.9
>    diff -u -r1.9 sgbc.c
>    --- o/sgbc.c       15 Feb 2003 00:38:28 -0000      1.9
>    +++ o/sgbc.c       29 Aug 2003 20:39:01 -0000
>    @@ -887,19 +887,24 @@
>       e = pagetochar(j);
>       for (p = s;  p < e;) {
>         if (get_mark_bit((int *)p)) {
>    -  p += PTR_ALIGN;
>    +  /* SGC cont pages: cont blocks must be no smaller than
>    +     sizeof(struct contblock), and must not have a sweep
>    +     granularity greater than this amount (e.g. CPTR_ALIGN) if
>    +     contblock leaks are to be avoided.  Used to be aligned at
>    +     PTR_ALIGN. CM 20030827 */
>    +  p += CPTR_ALIGN;
>          continue;
>         }
>    -      q = p + PTR_ALIGN;
>    +      q = p + CPTR_ALIGN;
>         while (q < e) {
>          if (!get_mark_bit((int *)q)) {
>    -    q += PTR_ALIGN;
>    +    q += CPTR_ALIGN;
>            continue;
>          }
>          break;
>         }
>         insert_contblock(p, q - p);
>    -      p = q + PTR_ALIGN;
>    +      p = q + CPTR_ALIGN;
>       }
>       i = j + 1;
>       }
>    @@ -961,6 +966,71 @@
>       return count;
>     }
> 
>    +#ifdef SGC_CONT_DEBUG
>    +void
>    +overlap_check(struct contblock *t1,struct contblock *t2) {
>    +
>    +  struct contblock *p;
>    +
>    +  for (;t1;t1=t1->cb_link) {
>    +
>    +    if (!inheap(t1)) {
>    +      fprintf(stderr,"%p not in heap\n",t1);
>    +      exit(1);
>    +    }
>    +
>    +    for (p=t2;p;p=p->cb_link) {
>    +
>    +      if (!inheap(p)) {
>    +  fprintf(stderr,"%p not in heap\n",t1);
>    +  exit(1);
>    +      }
>    +
>    +      if ((p<=t1 && (void *)p+p->cb_size>(void *)t1) ||
>    +    (t1<=p && (void *)t1+t1->cb_size>(void *)p)) {
>    +  fprintf(stderr,"Overlap %u %p  %u %p\n",t1->cb_size,t1,p->cb_size,p);
>    +  exit(1);
>    +      }
>    +      
>    +      if (p==p->cb_link) {
>    +  fprintf(stderr,"circle detected at %p\n",p);
>    +  exit(1);
>    +      }
>    +
>    +    }
>    +  
>    +    if (t1==t1->cb_link) {
>    +      fprintf(stderr,"circle detected at %p\n",t1);
>    +      exit(1);
>    +    }
>    +
>    +  }
>    +
>    +}
>    +
>    +void
>    +tcc(struct contblock *t) {
>    +
>    +  for (;t;t=t->cb_link) {
>    +
>    +    if (!inheap(t)) {
>    +      fprintf(stderr,"%p not in heap\n",t);
>    +      break;
>    +    }
>    +
>    +    fprintf(stderr,"%u at %p\n",t->cb_size,t);
>    +
>    +    if (t==t->cb_link) {
>    +      fprintf(stderr,"circle detected at %p\n",t);
>    +      break;
>    +    }
>    +
>    +  }
>    +
>    +}
>    +
>    +#endif      
>    +
>     int
>     sgc_start(void) {
> 
>    @@ -985,7 +1055,11 @@
>       {
>         int maxp=0;
>         int j;
>    -      int minfree = tm->tm_sgc_minfree;
>    +      /* SGC cont pages: This used to be simply set to tm_sgc_minfree,
>    +   which is a definite bug, as minfree could then be zero,
>    +   leading this type to claim SGC pages not of its type as
>    +   specified in type_map.  CM 20030827*/
>    +      int minfree = tm->tm_sgc_minfree > 0 ? tm->tm_sgc_minfree : 1 ;
>         int count;
>         bzero(free_map,npages*sizeof(short));
>         f = tm->tm_free;
>    @@ -1031,6 +1105,113 @@
>            goto FIND_FREE_PAGES;       
>         }
>       }
>    +
>    +/* SGC cont pages: Here we implement the contblock page division into
>    +   SGC and non-SGC types.  Unlike the other types, we need *whole*
>    +   free pages for contblock SGC, as there is no psersistent data
>    +   element (e.g. .m) on an allocated block itself which can indicate
>    +   its live status.  If anything on a page which is to be marked
>    +   read-only points to a live object on an SGC cont page, it will
>    +   never be marked and will be erroneously swept.  It is also possible
>    +   for dead objects to unnecessarily mark dead regions on SGC pages
>    +   and delay sweeping until the pointing type is GC'ed if SGC is
>    +   turned off for the pointing type, e.g. tm_sgc=0. (This was so by
>    +   default for a number of types, including bignums, and has now been
>    +   corrected in init_alloc in alloc.c.) We can't get around this
>    +   AFAICT, as old data on (writable) SGC pages must be marked lest it
>    +   is lost, and (old) data on now writable non-SGC pages might point
>    +   to live regions on SGC pages, yet might not themselves be reachable
>    +   from the mark origin through an unbroken chain of writable pages.
>    +   In any case, the possibility of a lot of garbage marks on contblock
>    +   pages, especially when the blocks are small as in bignums, makes
>    +   necessary the sweeping of minimal contblocks to prevent leaks. CM
>    +   20030827 */
>    +  {
>    +
>    +    void *p=NULL;
>    +    unsigned i,j,k,count;
>    +    struct contblock *new_cb_pointer=NULL,*tmp_cb_pointer=NULL,**cbpp;
>    +    
>    +    tm=tm_of(t_contiguous);
>    +    
>    +    /* SGC cont pages:  First count whole free pages available.  CM 
> 20030827 */
>    +    for (cbpp=&cb_pointer,count=0;*cbpp;cbpp=&(*cbpp)->cb_link) {
>    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    +      k=p-((void *)(*cbpp));
>    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) 
>    +  continue;
>    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    +      count+=i;
>    +    }
>    +    count=tm->tm_sgc>count ? tm->tm_sgc - count : 0;
>    +    
>    +    if (count>0) {
>    +      /* SGC cont pages: allocate more if necessary, dumping possible
>    +   GBC freed pages onto the old contblock list.  CM 20030827*/
>    +      int z=count+1;
>    +      void *p1=alloc_contblock(z*PAGESIZE);
>    +      p=PAGE_ROUND_UP(p1);
>    +      if (p>p1) {
>    +  z--;
>    +  insert_contblock(p1,p-p1);
>    +  insert_contblock(p+z*PAGESIZE,PAGESIZE-(p-p1));
>    +      }
>    +      tmp_cb_pointer=cb_pointer;
>    +      cb_pointer=new_cb_pointer;
>    +      /* SGC cont pages: add new pages to new contblock list. p is not
>    +   already on any list as ensured by alloc_contblock.  CM
>    +   20030827 */
>    +      insert_contblock(p,PAGESIZE*z);
>    +      new_cb_pointer=cb_pointer;
>    +      cb_pointer=tmp_cb_pointer;
>    +      for (i=0;i<z;i++) 
>    +  sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    +    }
>    +
>    +    for (cbpp=&cb_pointer;*cbpp;) {
>    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    +      k=p-((void *)(*cbpp));
>    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) {
>    +  cbpp=&(*cbpp)->cb_link;
>    +  continue;
>    +      }
>    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    +      i*=PAGESIZE;
>    +      j=(*cbpp)->cb_size-i-k;
>    +      /* SGC contblock pages:  remove this block from old list CM 
> 20030827 */
>    +      *cbpp=(*cbpp)->cb_link;
>    +      /* SGC contblock pages:  add fragments old list CM 20030827 */
>    +      if (k) {
>    +  ncb--;
>    +  insert_contblock(p-k,k);
>    +      }
>    +      if (j) {
>    +  ncb--;
>    +  insert_contblock(p+i,j);
>    +      }
>    +      tmp_cb_pointer=cb_pointer;
>    +      cb_pointer=new_cb_pointer;
>    +      /* SGC contblock pages: add whole pages to new list, p p-k, and
>    +   p+i are guaranteed to be distinct when used. CM 20030827 */
>    +      insert_contblock(p,i);
>    +      new_cb_pointer=cb_pointer;
>    +      cb_pointer=tmp_cb_pointer;
>    +      i/=PAGESIZE;
>    +      for (j=0;j<i;j++)
>    +  sgc_type_map[page(p)+j]|= SGC_PAGE_FLAG;
>    +    }
>    +
>    +    /* SGC contblock pages: switch to new free SGC contblock list. CM
>    +       20030827 */
>    +    old_cb_pointer=cb_pointer;
>    +    cb_pointer=new_cb_pointer;
>    +
>    +#ifdef SGC_CONT_DEBUG
>    +    overlap_check(old_cb_pointer,cb_pointer);
>    +#endif
>    +
>    +  }
>    +
>       /* Now  allocate the sgc relblock.   We do this as the tail
>        end of the ordinary rb.     */  
>       {
>    @@ -1117,6 +1298,26 @@
>       return 0;
>       sgc_enabled=0;
>       rb_start = old_rb_start;
>    +
>    +  /* SGC cont pages: restore contblocks, each tmp_cb_pointer coming
>    +     from the new list is guaranteed not to be on the old. Need to
>    +     grab 'next' before insert_contblock writes is.  CM 20030827 */
>    +  {
>    +
>    +    struct contblock *tmp_cb_pointer,*next;
>    +    if (old_cb_pointer) {
>    +#ifdef SGC_CONT_DEBUG
>    +      overlap_check(old_cb_pointer,cb_pointer);
>    +#endif
>    +      tmp_cb_pointer=cb_pointer;
>    +      cb_pointer=old_cb_pointer;
>    +      for (;tmp_cb_pointer;  tmp_cb_pointer=next) {
>    +  next=tmp_cb_pointer->cb_link;
>    +  insert_contblock((void *)tmp_cb_pointer,tmp_cb_pointer->cb_size);
>    +      }
>    +    }
>    +  }
>    +
>       for (i= t_start; i < t_contiguous ; i++)
>       if (TM_BASE_TYPE_P(i)) {
>         tm=tm_of(i);
>    
> =============================================================================
> 
> 
>    "Matt Kaufmann" <address@hidden> writes:
> 
>    > Hi, Camm --
>    > 
>    > Thanks for all your work!
>    > 
>    > I've rebuilt GCL with your patches and rebuilt ACL2 on top of that.  The 
> test
>    > completed successfully.  In case you're interested, the time is about 
> the same
>    > as before (actually slightly slower, though perhaps that's in the noise):
>    > 
>    >   New GCL time (avoiding some compilation, as in the times below):
>    >   15413.890u 38.960s 4:17:41.55 99.9%    0+0k 0+0io 63427pf+0w
>    > 
>    > Times reported previously:
>    > 
>    >   Allegro CL (development environment) time:
>    >   3839.780u 19.680s 1:04:24.64 99.8%      0+0k 0+0io 85891pf+0w
>    > 
>    >   GCL time:
>    >   14599.720u 39.610s 4:04:13.28 99.9%     0+0k 0+0io 54777pf+0w
>    > 
>    > I have a question about this passage from your previous email:
>    > 
>    >   As for your performance observations, as you know I still have a bit
>    >   of profiling on my todo list concerning acl2, so a definitive
>    >   statement will have to wait until then.  But I noticed in the existing
>    >   acl2 code a comment in which SGC is turned on "at the suggestion of
>    >   wfs" at a certain point.  Just to make sure we all understand, SGC is
>    >   a GC *write barrier*, it is only efficient if most of the data behind
>    >   the barrier (before executing (sgc-on t)) is static.  With your
>    >   enormous image, you should make sure that sgc is not turned on too
>    >   early.  As my patches only affect sgc contiguous pages, and as these
>    >   seem to affect your results, this may be a factor in your poor
>    >   performance.  
>    > 
>    > Can you expand on this?  Is your concern that we aren't including enough
>    > read-only stuff before saving the image?  We turn sgc on just before 
> doing some
>    > allocation, setting the hole size, and then saving the image.
>    > 
>    > By the way, for what it's worth, here how I am configuring GCL:
>    > 
>    > ./configure '--enable-maxpage=128*1024' '--x-libraries=/usr/X11R6/lib' 
> '--x-includes=/usr/X11R6/include'
>    > 
>    > Thanks --
>    > -- Matt
>    >    cc: address@hidden, address@hidden, address@hidden
>    >    From: "Camm Maguire" <address@hidden>
>    >    Date: 29 Aug 2003 00:04:34 -0400
>    >    User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>    >    X-WSS-ID: 13500F5C1393624-01-01
>    >    Content-Type: text/plain;
>    >     charset=us-ascii
>    > 
>    >    Greetings!  OK my apologies -- I wrongly assumed that alloc_contblock
>    >    returned aligned pages.  This one works for me (acl2 and maxima pass
>    >    all tests).  You can try it now, or wait until I clean up the
>    >    debugging stuff and commit into CVS version 2.5.4 sometime tomorrow.
>    > 
>    >    Take care,
>    > 
>    >    
> =============================================================================
>    >    Index: h/object.h
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/h/object.h,v
>    >    retrieving revision 1.18.4.1
>    >    diff -u -r1.18.4.1 object.h
>    >    --- h/object.h        16 Jul 2003 02:02:49 -0000      1.18.4.1
>    >    +++ h/object.h        29 Aug 2003 03:54:25 -0000
>    >    @@ -759,6 +759,7 @@
>    >     short   tm_max_grow;    /* max amount to grow when growing */
>    >     short   tm_growth_percent;  /* percent to increase maxpages */
>    >     short   tm_percent_free;  /* percent which must be free after a gc 
> for this type */
>    >    +        short   tm_distinct;       /* pages of this type are 
> distinct */
>    > 
>    >     };
>    > 
>    >    Index: h/page.h
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/h/page.h,v
>    >    retrieving revision 1.4.4.1
>    >    diff -u -r1.4.4.1 page.h
>    >    --- h/page.h  21 Aug 2003 04:17:47 -0000      1.4.4.1
>    >    +++ h/page.h  29 Aug 2003 03:54:25 -0000
>    >    @@ -29,6 +29,12 @@
>    >     #define ROUND_UP_PTR(n)      (((long)(n) + (PTR_ALIGN-1)) & 
> ~(PTR_ALIGN-1))
>    >     #define ROUND_DOWN_PTR(n) (((long)(n)  & ~(PTR_ALIGN-1)))
>    > 
>    >    +/* alignment required for contiguous pointers */
>    >    +#define CPTR_ALIGN (PTR_ALIGN < sizeof(struct contblock) ? 
> sizeof(struct contblock) : PTR_ALIGN)
>    >    +
>    >    +#define ROUND_UP_PTR_CONT(n) (((long)(n) + (CPTR_ALIGN-1)) & 
> ~(CPTR_ALIGN-1))
>    >    +#define ROUND_DOWN_PTR_CONT(n) (((long)(n)  & ~(CPTR_ALIGN-1)))
>    >    +
>    > 
>    >     #ifdef SGC
>    > 
>    >    Index: o/alloc.c
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/o/alloc.c,v
>    >    retrieving revision 1.19
>    >    diff -u -r1.19 alloc.c
>    >    --- o/alloc.c 1 Mar 2003 22:37:37 -0000       1.19
>    >    +++ o/alloc.c 29 Aug 2003 03:54:35 -0000
>    >    @@ -425,9 +425,19 @@
>    >     /*
>    >     printf("allocating %d-byte contiguous block...\n", n);
>    >     */
>    >    +      /* SGC cont pages: contiguous pointers must be aligned at
>    >    +         CPTR_ALIGN, no smaller than sizeof (struct contblock).
>    >    +         Here we allocate a bigger block, and rely on the fact that
>    >    +         allocate_page returns pointers appropriately aligned,
>    >    +         being also aligned on page boundaries.  Protection against
>    >    +         a too small contblock was aforded before by a minimum
>    >    +         contblock size enforced by CBMINSIZE in insert_contblock.
>    >    +         However, this leads to a leak when many small cont blocks
>    >    +         are allocated, e.g. with bignums, so is now removed.  CM
>    >    +         20030827 */
>    > 
>    >     g = FALSE;
>    >    -     n = ROUND_UP_PTR(n);
>    >    +     n = ROUND_UP_PTR_CONT(n);
>    > 
>    >     ONCE_MORE:
>    >      CHECK_INTERRUPT;
>    >    @@ -472,8 +482,16 @@
>    >    }
>    >     p = alloc_page(m);
>    > 
>    >    -     for (i = 0;  i < m;  i++)
>    >    +     for (i = 0;  i < m;  i++) {
>    >             type_map[page(p) + i] = (char)t_contiguous;
>    >    +
>    >    +             /* SGC cont pages: Before this point, GCL never marked 
> contiguous
>    >    +                pages for SGC, causing no contiguous pages to be
>    >    +                swept when SGC was on.  Here we follow the behavior
>    >    +                for other pages in add_to_freelist. CM 20030827  */
>    >    +             if (sgc_enabled && tm_table[t_contiguous].tm_sgc)
>    >    +               sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    >    +     }
>    >     ncbpage += m;
>    >     insert_contblock(p+n, PAGESIZE*m - n);
>    >     return(p);
>    >    @@ -484,19 +502,53 @@
>    > 
>    >       struct contblock **cbpp, *cbp;
>    > 
>    >    -  if (s < CBMINSIZE)
>    >    +  /* SGC cont pages: This used to return when s<CBMINSIZE, but we 
> need
>    >    +     to be able to sweep small (e.g. bignum) contblocks.  FIXME:
>    >    +     should never be called with s<=0 to begin with.  CM 20030827*/
>    >    +  if (s<=0)
>    >  return;
>    >       ncb++;
>    >       cbp = (struct contblock *)p;
>    >    -  cbp->cb_size = s;
>    >    +  /* SGC cont pages: allocated sizes may not be zero mod CPTR_SIZE,
>    >    +     e.g. string fillp, but alloc_contblock rounded up the allocation
>    >    +     like this, which we follow here.  CM 20030827 */
>    >    +  cbp->cb_size = ROUND_UP_PTR_CONT(s);
>    >       for (cbpp = &cb_pointer;  *cbpp;  cbpp = &((*cbpp)->cb_link))
>    >  if ((*cbpp)->cb_size >= s) {
>    >    +#undef DEBUG
>    >    +#define DEBUG
>    >    +#ifdef DEBUG
>    >    +      if (*cbpp==cbp) {
>    >    +     fprintf(stderr,"Trying to install a circle at %p\n",cbp);
>    >    +     exit(1);
>    >    +      }
>    >    +      if (sgc_enabled) {
>    >    +     extern struct contblock *old_cb_pointer;
>    >    +     extern void overlap_check(struct contblock *,struct contblock 
> *);
>    >    +
>    >    +     overlap_check(old_cb_pointer,cb_pointer);
>    >    +      }
>    >    +#endif
>    >    cbp->cb_link = *cbpp;
>    >    *cbpp = cbp;
>    >    +#ifdef DEBUG
>    >    +      if (sgc_enabled) {
>    >    +     extern struct contblock *old_cb_pointer;
>    >    +     extern void overlap_check(struct contblock *,struct contblock 
> *);
>    >    +     overlap_check(old_cb_pointer,cb_pointer);
>    >    +      }
>    >    +#endif
>    >    return;
>    >  }
>    >       cbp->cb_link = NULL;
>    >       *cbpp = cbp;
>    >    +#ifdef DEBUG
>    >    +  if (sgc_enabled) {
>    >    +    extern struct contblock *old_cb_pointer;
>    >    +    extern void overlap_check(struct contblock *,struct contblock *);
>    >    +    overlap_check(old_cb_pointer,cb_pointer);
>    >    +  }
>    >    +#endif
>    > 
>    >     }
>    > 
>    >    @@ -568,19 +620,30 @@
>    >     return(p);
>    >     }
>    > 
>    >    +/* Add a tm_distinct field to prevent page type sharing if desired.
>    >    +   Not used now, as its never desirable from an efficiency point of
>    >    +   view, and as the only known place one must separate is cons and
>    >    +   fixnum, which are of different sizes unless PTR_ALIGN is set too
>    >    +   high (e.g. 16 on a 32bit machine).  See the ordering of init_tm
>    >    +   calls for these types below -- reversing would wind up merging the
>    >    +   types with the current algorithm.  CM 20030827 */
>    >    +
>    >     static void
>    >    -init_tm(enum type t, char *name, int elsize, int nelts, int sgc) {
>    >    +init_tm(enum type t, char *name, int elsize, int nelts, int sgc,int 
> distinct) {
>    > 
>    >       int i, j;
>    >       int maxpage;
>    >       /* round up to next number of pages */
>    >       maxpage = (((nelts * elsize) + PAGESIZE -1)/PAGESIZE);
>    >       tm_table[(int)t].tm_name = name;
>    >    -  for (j = -1, i = 0;  i < (int)t_end;  i++)
>    >    -    if (tm_table[i].tm_size != 0 &&
>    >    -     tm_table[i].tm_size >= elsize &&
>    >    -     (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    >    -      j = i;
>    >    +  j=-1;
>    >    +  if (!distinct)
>    >    +    for (i = 0;  i < (int)t_end;  i++)
>    >    +      if (tm_table[i].tm_size != 0 &&
>    >    +       tm_table[i].tm_size >= elsize &&
>    >    +       !tm_table[i].tm_distinct &&
>    >    +       (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    >    +     j = i;
>    >       if (j >= 0) {
>    >  tm_table[(int)t].tm_type = (enum type)j;
>    >  tm_table[j].tm_maxpage += maxpage;
>    >    @@ -598,6 +661,7 @@
>    >       /*tm_table[(int)t].tm_npage = 0; */  /* dont zero nrbpage.. */
>    >       tm_table[(int)t].tm_maxpage = maxpage;
>    >       tm_table[(int)t].tm_gbccount = 0;
>    >    +  tm_table[(int)t].tm_distinct=distinct;
>    >     #ifdef SGC   
>    >       tm_table[(int)t].tm_sgc = sgc;
>    >       tm_table[(int)t].tm_sgc_max = 3000;
>    >    @@ -688,40 +752,46 @@
>    >       for (i = 0;  i < MAXPAGE;  i++)
>    >  type_map[i] = (char)t_other;
>    > 
>    >    +  /* Unused (at present) tm_distinct flag added.  Note that if cons
>    >    +     and fixnum share page types, errors will be introduced.
>    >    +
>    >    +     Gave each page type at least some sgc pages by default.  Of
>    >    +     course changeable by allocate-sgc.  CM 20030827 */
>    >    +
>    >       init_tm(t_fixnum, "NFIXNUM",
>    >    -       sizeof(struct fixnum_struct), 8192,20);
>    >    -  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50 );
>    >    -  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 
> 5461,0 );
>    >    -  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,0  );
>    >    -  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,0 );
>    >    -  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1  );
>    >    -  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1 );
>    >    -  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1 );
>    >    -  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,0 );
>    >    -  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,0 );
>    >    +       sizeof(struct fixnum_struct), 8192,20,0);
>    >    +  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50,0 );
>    >    +  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 
> 5461,1,0 );
>    >    +  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,1,0  );
>    >    +  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,1,0 );
>    >    +  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1,0  );
>    >    +  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1,0 );
>    >    +  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1,0 );
>    >    +  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,1,0 );
>    >    +  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,1,0 );
>    >       init_tm(t_shortfloat, "FSHORT-FLOAT",
>    >    -       sizeof(struct shortfloat_struct), 256 ,1);
>    >    +       sizeof(struct shortfloat_struct), 256 ,1,0);
>    >       init_tm(t_longfloat, "LLONG-FLOAT",
>    >    -       sizeof(struct longfloat_struct), 170 ,0);
>    >    -  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 ,0);
>    >    -  init_tm(t_character,"#CHARACTER",sizeof(struct character), 256 ,0);
>    >    -  init_tm(t_package, ":PACKAGE", sizeof(struct package), 2*PAGESIZE 
> / sizeof(struct package),0);
>    >    -  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 78,0 
> );
>    >    -  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,0);
>    >    -  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 73 
> ,0);
>    >    -  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,0);
>    >    -  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 ,0);
>    >    -  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 256 
> ,0);
>    >    -  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 ,0);
>    >    -  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 ,0);
>    >    -  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 ,0);
>    >    -  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,0);
>    >    -  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,0);
>    >    -  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,0);
>    >    -  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,0);
>    >    -  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,0);
>    >    -  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20);
>    >    -  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20);
>    >    +       sizeof(struct longfloat_struct), 170 ,1,0);
>    >    +  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 ,1,0);
>    >    +  init_tm(t_character,"#CHARACTER",sizeof(struct character), 256 
> ,1,0);
>    >    +  init_tm(t_package, ":PACKAGE", sizeof(struct package), 2*PAGESIZE 
> / sizeof(struct package),1,0);
>    >    +  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 
> 78,1,0 );
>    >    +  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,1,0);
>    >    +  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 73 
> ,1,0);
>    >    +  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,1,0);
>    >    +  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 
> ,1,0);
>    >    +  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 256 
> ,1,0);
>    >    +  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 ,1,0);
>    >    +  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 ,1,0);
>    >    +  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 ,1,0);
>    >    +  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,1,0);
>    >    +  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,1,0);
>    >    +  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,1,0);
>    >    +  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,1,0);
>    >    +  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,1,0);
>    >    +  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20,0);
>    >    +  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20,0);
>    >       tm_table[t_relocatable].tm_nppage = PAGESIZE;
>    >       tm_table[t_contiguous].tm_nppage = PAGESIZE;
>    > 
>    >    @@ -895,8 +965,15 @@
>    >  FEerror("Can't allocate ~D pages for contiguous blocks.",
>    >         1, make_fixnum(npages));
>    > 
>    >    -  for (i = 0;  i < m;  i++)
>    >    +  for (i = 0;  i < m;  i++) {
>    >  type_map[page(p + PAGESIZE*i)] = (char)t_contiguous;
>    >    +    /* SGC cont pages: Before this point, GCL never marked contiguous
>    >    +       pages for SGC, causing no contiguous pages to be
>    >    +       swept when SGC was on.  Here we follow the behavior
>    >    +       for other pages in add_to_freelist. CM 20030827  */
>    >    +    if (sgc_enabled && tm_table[t_contiguous].tm_sgc)
>    >    +      sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    >    +  }
>    > 
>    >       ncbpage += m;
>    >       insert_contblock(p, PAGESIZE*m);
>    >    @@ -1140,8 +1217,11 @@
>    >     #endif       
>    >     for (p = &malloc_list; *p && !endp(*p);  p = &((*p)->c.c_cdr))
>    >             if ((*p)->c.c_car->st.st_self == ptr) {
>    >    -                     insert_contblock((*p)->c.c_car->st.st_self,
>    >    -                                      (*p)->c.c_car->st.st_dim);
>    >    +/* SGC contblock pages: leave sweeping to GBC.  Could also try
>    >    +   protecting this with sgc_enabled && strm->d.s==SGC_NORMAL and a
>    >    +   switch to old_cb_pointer as appropriate  */
>    >    +/*                   insert_contblock((*p)->c.c_car->st.st_self, */
>    >    +/*                                    (*p)->c.c_car->st.st_dim); */
>    >                     (*p)->c.c_car->st.st_self = NULL;
>    >                     *p = (*p)->c.c_cdr;
>    >                     return ;
>    >    @@ -1189,7 +1269,10 @@
>    >     x->st.st_fillp = x->st.st_dim = size;
>    >     for (i = 0;  i < size;  i++)
>    >       x->st.st_self[i] = ((char *)ptr)[i];
>    >    -     insert_contblock(ptr, j);
>    >    +/* SGC contblock pages: leave sweeping to GBC.  Could also try
>    >    +   protecting this with sgc_enabled && strm->d.s==SGC_NORMAL and a
>    >    +   switch to old_cb_pointer as appropriate  */
>    >    +/*   insert_contblock(ptr, j); */
>    >     return(x->st.st_self);
>    >    }
>    >  }
>    >    Index: o/file.d
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/o/file.d,v
>    >    retrieving revision 1.21
>    >    diff -u -r1.21 file.d
>    >    --- o/file.d  18 Feb 2003 02:32:03 -0000      1.21
>    >    +++ o/file.d  29 Aug 2003 03:54:35 -0000
>    >    @@ -303,11 +303,16 @@
>    >     deallocate_stream_buffer(strm)
>    >     object strm;
>    >     {
>    >    -  if (strm->sm.sm_buffer)
>    >    -    {insert_contblock(strm->sm.sm_buffer, BUFSIZ);
>    >    -     strm->sm.sm_buffer = 0;}
>    >    - else
>    >    -    printf("no buffer? %p  \n",strm->sm.sm_fp);
>    >    +
>    >    +/* SGC contblock pages: leave sweeping to GBC.  Could also try
>    >    +   protecting this with sgc_enabled && strm->d.s==SGC_NORMAL and a
>    >    +   switch to old_cb_pointer as appropriate  */
>    >    +
>    >    +/*   if (strm->sm.sm_buffer) */
>    >    +/*     {insert_contblock(strm->sm.sm_buffer, BUFSIZ); */
>    >    +/*      strm->sm.sm_buffer = 0;} */
>    >    +/*  else */
>    >    +/*     printf("no buffer? %p  \n",strm->sm.sm_fp); */
>    > 
>    >     #ifndef FCLOSE_SETBUF_OK
>    >       strm->sm.sm_fp->_base = NULL;
>    >    Index: o/gbc.c
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/o/gbc.c,v
>    >    retrieving revision 1.13.4.1
>    >    diff -u -r1.13.4.1 gbc.c
>    >    --- o/gbc.c   30 Jul 2003 15:11:12 -0000      1.13.4.1
>    >    +++ o/gbc.c   29 Aug 2003 03:54:36 -0000
>    >    @@ -1012,19 +1012,24 @@
>    >  e = pagetochar(j);
>    >  for (p = s;  p < e;) {
>    >    if (get_mark_bit((int *)p)) {
>    >    -     p += PTR_ALIGN;
>    >    +     /* SGC cont pages: cont blocks must be no smaller than
>    >    +        sizeof(struct contblock), and must not have a sweep
>    >    +        granularity greater than this amount (e.g. CPTR_ALIGN) if
>    >    +        contblock leaks are to be avoided.  Used to be aligned at
>    >    +        PTR_ALIGN. CM 20030827 */
>    >    +     p += CPTR_ALIGN;
>    >     continue;
>    >    }
>    >    -      q = p + PTR_ALIGN;
>    >    +      q = p + CPTR_ALIGN;
>    >    while (q < e) {
>    >     if (!get_mark_bit((int *)q)) {
>    >    -       q += PTR_ALIGN;
>    >    +       q += CPTR_ALIGN;
>    >       continue;
>    >     }
>    >     break;
>    >    }
>    >    insert_contblock(p, q - p);
>    >    -      p = q + PTR_ALIGN;
>    >    +      p = q + CPTR_ALIGN;
>    >  }
>    >  i = j + 1;
>    >       }
>    >    @@ -1067,8 +1072,8 @@
>    >  if(sgc_enabled) sgc_quit();
>    > 
>    >  }
>    >    -  
>    >    -  
>    >    +
>    >    +
>    >     #ifdef DEBUG
>    >       debug = symbol_value(sSAgbc_messageA) != Cnil;
>    >     #endif
>    >    @@ -1278,6 +1283,9 @@
>    > 
>    >       interrupt_enable = TRUE;
>    > 
>    >    +  if (in_sgc && sgc_enabled==0)
>    >    +    sgc_start();
>    >    +  
>    >       if (saving_system) {
>    >  j = (rb_pointer-rb_start+PAGESIZE-1) / PAGESIZE;
>    > 
>    >    @@ -1323,10 +1331,6 @@
>    >       if (GBC_exit_hook != NULL)
>    >  (*GBC_exit_hook)();
>    > 
>    >    -  
>    >    -  if (in_sgc && sgc_enabled==0)
>    >    -    sgc_start();
>    >    -  
>    >       if(gc_time>=0 && !--gc_recursive) 
> {gc_time=gc_time+(gc_start=(runtime()-gc_start));}
>    > 
>    >       if (sSAnotify_gbcA->s.s_dbind != Cnil) {
>    >    @@ -1423,8 +1427,10 @@
>    >       if (!MAYBE_DATA_P(p) || (enum type)type_map[page(p)] != 
> t_contiguous)
>    >  return;
>    >       q = p + s;
>    >    -  x = (int *)ROUND_DOWN_PTR(p);
>    >    -  y = (int *)ROUND_UP_PTR(q);
>    >    +  /* SGC cont pages: contblock pages must be no smaller than
>    >    +     sizeof(struct contblock).  CM 20030827 */
>    >    +  x = (int *)ROUND_DOWN_PTR_CONT(p);
>    >    +  y = (int *)ROUND_UP_PTR_CONT(q);
>    >       for (;  x < y;  x++)
>    >  set_mark_bit(x);
>    >     }
>    >    Index: o/gmp.c
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/o/gmp.c,v
>    >    retrieving revision 1.3
>    >    diff -u -r1.3 gmp.c
>    >    --- o/gmp.c   15 Feb 2003 00:38:28 -0000      1.3
>    >    +++ o/gmp.c   29 Aug 2003 03:54:36 -0000
>    >    @@ -15,7 +15,10 @@
>    >       old = oldmem;
>    >       bcopy(MP_SELF(big_gcprotect),new,oldsize);
>    >       MP_SELF(big_gcprotect)=0;
>    >    -  if (inheap(oldmem)) insert_contblock(oldmem,oldsize);
>    >    +/* SGC contblock pages: leave sweeping to GBC.  Could also try
>    >    +   protecting this with sgc_enabled && strm->d.s==SGC_NORMAL and a
>    >    +   switch to old_cb_pointer as appropriate  */
>    >    +/*   if (inheap(oldmem)) insert_contblock(oldmem,oldsize); */
>    >       return new;
>    >     }
>    > 
>    >    Index: o/sgbc.c
>    >    ===================================================================
>    >    RCS file: /cvsroot/gcl/gcl/o/sgbc.c,v
>    >    retrieving revision 1.9
>    >    diff -u -r1.9 sgbc.c
>    >    --- o/sgbc.c  15 Feb 2003 00:38:28 -0000      1.9
>    >    +++ o/sgbc.c  29 Aug 2003 03:54:36 -0000
>    >    @@ -887,19 +887,24 @@
>    >  e = pagetochar(j);
>    >  for (p = s;  p < e;) {
>    >    if (get_mark_bit((int *)p)) {
>    >    -     p += PTR_ALIGN;
>    >    +     /* SGC cont pages: cont blocks must be no smaller than
>    >    +        sizeof(struct contblock), and must not have a sweep
>    >    +        granularity greater than this amount (e.g. CPTR_ALIGN) if
>    >    +        contblock leaks are to be avoided.  Used to be aligned at
>    >    +        PTR_ALIGN. CM 20030827 */
>    >    +     p += CPTR_ALIGN;
>    >     continue;
>    >    }
>    >    -      q = p + PTR_ALIGN;
>    >    +      q = p + CPTR_ALIGN;
>    >    while (q < e) {
>    >     if (!get_mark_bit((int *)q)) {
>    >    -       q += PTR_ALIGN;
>    >    +       q += CPTR_ALIGN;
>    >       continue;
>    >     }
>    >     break;
>    >    }
>    >    insert_contblock(p, q - p);
>    >    -      p = q + PTR_ALIGN;
>    >    +      p = q + CPTR_ALIGN;
>    >  }
>    >  i = j + 1;
>    >       }
>    >    @@ -961,6 +966,56 @@
>    >       return count;
>    >     }
>    > 
>    >    +   /* SGC cont pages: After SGC_start, old_cb_pointer will be a 
> linked
>    >    +   list of free blocks on non-SGC pages, and cb_pointer will be
>    >    +   likewise for SGC pages.  CM 20030827*/
>    >    +struct contblock *old_cb_pointer;
>    >    +
>    >    +#undef MDEBUG
>    >    +#define MDEBUG
>    >    +#ifdef MDEBUG
>    >    +void
>    >    +overlap_check(struct contblock *t1,struct contblock *t2) {
>    >    +
>    >    +  struct contblock *p;
>    >    +
>    >    +  for (;t1;t1=t1->cb_link) {
>    >    +
>    >    +    if (!inheap(t1)) {
>    >    +      fprintf(stderr,"%p not in heap\n",t1);
>    >    +      exit(1);
>    >    +    }
>    >    +
>    >    +    for (p=t2;p;p=p->cb_link) {
>    >    +
>    >    +      if (!inheap(p)) {
>    >    +     fprintf(stderr,"%p not in heap\n",t1);
>    >    +     exit(1);
>    >    +      }
>    >    +
>    >    +      if ((p<=t1 && (void *)p+p->cb_size>(void *)t1) ||
>    >    +       (t1<=p && (void *)t1+t1->cb_size>(void *)p)) {
>    >    +     fprintf(stderr,"Overlap %u %p  %u 
> %p\n",t1->cb_size,t1,p->cb_size,p);
>    >    +     exit(1);
>    >    +      }
>    >    +      
>    >    +      if (p==p->cb_link) {
>    >    +     fprintf(stderr,"circle detected at %p\n",p);
>    >    +     exit(1);
>    >    +      }
>    >    +
>    >    +    }
>    >    +     
>    >    +    if (t1==t1->cb_link) {
>    >    +      fprintf(stderr,"circle detected at %p\n",t1);
>    >    +      exit(1);
>    >    +    }
>    >    +
>    >    +  }
>    >    +
>    >    +}
>    >    +#endif         
>    >    +
>    >     int
>    >     sgc_start(void) {
>    > 
>    >    @@ -985,7 +1040,11 @@
>    >  {
>    >    int maxp=0;
>    >    int j;
>    >    -      int minfree = tm->tm_sgc_minfree;
>    >    +      /* SGC cont pages: This used to be simply set to 
> tm_sgc_minfree,
>    >    +      which is a definite bug, as minfree could then be zero,
>    >    +      leading this type to claim SGC pages not of its type as
>    >    +      specified in type_map.  CM 20030827*/
>    >    +      int minfree = tm->tm_sgc_minfree > 0 ? tm->tm_sgc_minfree : 1 ;
>    >    int count;
>    >    bzero(free_map,npages*sizeof(short));
>    >    f = tm->tm_free;
>    >    @@ -1031,6 +1090,112 @@
>    >       goto FIND_FREE_PAGES;       
>    >    }
>    >  }
>    >    +
>    >    +/* SGC cont pages: Here we implement the contblock page division into
>    >    +   SGC and non-SGC types.  Unlike the other types, we need *whole*
>    >    +   free pages for contblock SGC, as there is no psersistent data
>    >    +   element (e.g. .m) on an allocated block itself which can indicate
>    >    +   its live status.  If anything on a page which is to be marked
>    >    +   read-only points to a live object on an SGC cont page, it will
>    >    +   never be marked and will be erroneously swept.  It is also 
> possible
>    >    +   for dead objects to unnecessarily mark dead regions on SGC pages
>    >    +   and delay sweeping until the pointing type is GC'ed if SGC is
>    >    +   turned off for the pointing type, e.g. tm_sgc=0. (This was so by
>    >    +   default for a number of types, including bignums, and has now been
>    >    +   corrected in init_alloc in alloc.c.) We can't get around this
>    >    +   AFAICT, as old data on (writable) SGC pages must be marked lest it
>    >    +   is lost, and (old) data on now writable non-SGC pages might point
>    >    +   to live regions on SGC pages, yet might not themselves be 
> reachable
>    >    +   from the mark origin through an unbroken chain of writable pages.
>    >    +   In any case, the possibility of a lot of garbage marks on 
> contblock
>    >    +   pages, especially when the blocks are small as in bignums, makes
>    >    +   necessary the sweeping of minimal contblocks to prevent leaks. CM
>    >    +   20030827 */
>    >    +  {
>    >    +    void *p=NULL;
>    >    +    unsigned i,j,k,count;
>    >    +    struct contblock 
> *new_cb_pointer=NULL,*tmp_cb_pointer=NULL,**cbpp;
>    >    +
>    >    +    tm=tm_of(t_contiguous);
>    >    +
>    >    +    /* SGC cont pages:  First count whole free pages available.  CM 
> 20030827 */
>    >    +    for (cbpp=&cb_pointer,count=0;*cbpp;cbpp=&(*cbpp)->cb_link) {
>    >    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    >    +      k=p-((void *)(*cbpp));
>    >    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) 
>    >    +     continue;
>    >    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    >    +      count+=i;
>    >    +    }
>    >    +    count=tm->tm_sgc>count ? tm->tm_sgc - count : 0;
>    >    +
>    >    +    if (count>0) {
>    >    +      /* SGC cont pages: allocate more if necessary, dumping possible
>    >    +      GBC freed pages onto the old contblock list.  CM 20030827*/
>    >    +      int z=count+1;
>    >    +      void *p1=alloc_contblock(z*PAGESIZE);
>    >    +      p=PAGE_ROUND_UP(p1);
>    >    +      if (p>p1) {
>    >    +     z--;
>    >    +     insert_contblock(p1,p-p1);
>    >    +     insert_contblock(p+z*PAGESIZE,PAGESIZE-(p-p1));
>    >    +      }
>    >    +      tmp_cb_pointer=cb_pointer;
>    >    +      cb_pointer=new_cb_pointer;
>    >    +      /* SGC cont pages: add new pages to new contblock list. p is 
> not
>    >    +      already on any list as ensured by alloc_contblock.  CM
>    >    +      20030827 */
>    >    +      insert_contblock(p,PAGESIZE*z);
>    >    +      new_cb_pointer=cb_pointer;
>    >    +      cb_pointer=tmp_cb_pointer;
>    >    +      for (i=0;i<z;i++) 
>    >    +     sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    >    +    }
>    >    +
>    >    +    for (cbpp=&cb_pointer;*cbpp;) {
>    >    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    >    +      k=p-((void *)(*cbpp));
>    >    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) {
>    >    +     cbpp=&(*cbpp)->cb_link;
>    >    +     continue;
>    >    +      }
>    >    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    >    +      i*=PAGESIZE;
>    >    +      j=(*cbpp)->cb_size-i-k;
>    >    +      /* SGC contblock pages:  remove this block from old list CM 
> 20030827 */
>    >    +      *cbpp=(*cbpp)->cb_link;
>    >    +      /* SGC contblock pages:  add fragments old list CM 20030827 */
>    >    +      if (k) {
>    >    +     ncb--;
>    >    +     insert_contblock(p-k,k);
>    >    +      }
>    >    +      if (j) {
>    >    +     ncb--;
>    >    +     insert_contblock(p+i,j);
>    >    +      }
>    >    +      tmp_cb_pointer=cb_pointer;
>    >    +      cb_pointer=new_cb_pointer;
>    >    +      /* SGC contblock pages: add whole pages to new list, p p-k, and
>    >    +      p+i are guaranteed to be distinct when used. CM 20030827 */
>    >    +      insert_contblock(p,i);
>    >    +      new_cb_pointer=cb_pointer;
>    >    +      cb_pointer=tmp_cb_pointer;
>    >    +      i/=PAGESIZE;
>    >    +      for (j=0;j<i;j++)
>    >    +     sgc_type_map[page(p)+j]|= SGC_PAGE_FLAG;
>    >    +    }
>    >    +
>    >    +    /* SGC contblock pages: switch to new free SGC contblock list. CM
>    >    +       20030827 */
>    >    +    old_cb_pointer=cb_pointer;
>    >    +    cb_pointer=new_cb_pointer;
>    >    +
>    >    +#ifdef MDEBUG
>    >    +    overlap_check(old_cb_pointer,cb_pointer);
>    >    +#endif
>    >    +
>    >    +  }
>    >    +
>    >       /* Now  allocate the sgc relblock.   We do this as the tail
>    >   end of the ordinary rb.     */  
>    >       {
>    >    @@ -1117,6 +1282,25 @@
>    >  return 0;
>    >       sgc_enabled=0;
>    >       rb_start = old_rb_start;
>    >    +
>    >    +  /* SGC cont pages: restore contblocks, each tmp_cb_pointer coming
>    >    +     from the new list is guaranteed not to be on the old. Need to
>    >    +     grab 'next' before insert_contblock writes is.  CM 20030827 */
>    >    +  {
>    >    +    struct contblock *tmp_cb_pointer,*next;
>    >    +#ifdef MDEBUG
>    >    +    overlap_check(old_cb_pointer,cb_pointer);
>    >    +#endif
>    >    +    if (old_cb_pointer) {
>    >    +      tmp_cb_pointer=cb_pointer;
>    >    +      cb_pointer=old_cb_pointer;
>    >    +      for (;tmp_cb_pointer;  tmp_cb_pointer=next) {
>    >    +     next=tmp_cb_pointer->cb_link;
>    >    +     insert_contblock((void 
> *)tmp_cb_pointer,tmp_cb_pointer->cb_size);
>    >    +      }
>    >    +    }
>    >    +  }
>    >    +
>    >       for (i= t_start; i < t_contiguous ; i++)
>    >  if (TM_BASE_TYPE_P(i)) {
>    >    tm=tm_of(i);
>    >    
> =============================================================================
>    > 
>    >    "Matt Kaufmann" <address@hidden> writes:
>    > 
>    >    > Hi, Camm --
>    >    > 
>    >    > I applied your patches to the GCL version we have at AMD (which 
> incorporates
>    >    > the other patches you've sent) and got a segmentation violation 
> during GC.  The
>    >    > last few lines are as shown below.  I'm afraid I can't send out the 
> source
>    >    > files, but if there's some way you'd like me to re-run this test, 
> let me know.
>    >    > (Maybe you want to send me a tarball of gcl, or point to it on the 
> web for me
>    >    > to fetch, in case I messed up in applying the patches, and in case 
> you've made
>    >    > other patches that I don't have.)  Interestingly, the wall times 
> for the first
>    >    > two parts of the test were significantly different between this run 
> and the
>    >    > latest one before the new patches were applied.
>    >    > 
>    >    > In minutes,
>    >    > new vs. old:
>    >    > 
>    >    >  9 vs. 18 [model-raw]
>    >    > 26 vs. 16 [bvecp-raw]
>    >    > 
>    >    > Here are those last few lines.
>    >    > 
>    >    > [SGC for 58 STRING pages..(3398 writable)..(T=5).GC finished]
>    >    > [SGC for 58 STRING pages..(3399 writable)..(T=5).GC finished]
>    >    > [SGC for 53 CONTIGUOUS-BLOCKS pages..(3400 writable)..(T=5).GC 
> finished]
>    >    > [SGC for 58 STRING pages..(3405 writable)..(T=5).GC finished]
>    >    > [SGC for 58 STRING pages..(3406 writable)..(T=5).GC finished]
>    >    > [SGC for 58 STRING pages..(3406 writable)..(T=6).GC finished]
>    >    > [SGC for 58 STRING pages..(3426 writable)..(T=5).GC finished]
>    >    > [SGC for 918 CONS pages..(3443 writable)..(T=6).GC finished]
>    >    > [SGC for 918 CONS pages..(3443 writable)..(T=6).GC finished]
>    >    > [SGC for 918 CONS pages..(3444 writable)..(T=6).GC finished]
>    >    > [SGC for 53 CONTIGUOUS-BLOCKS pages..(3445 writable)..(T=7).GC 
> finished]
>    >    > [SGC for 58 STRING pages..(3556 writable)..(T=7).GC finished]
>    >    > [SGC for 58 STRING pages..(3592 writable)..(T=7).GC finished]
>    >    > [SGC for 58 STRING pages..(3627 writable)..(T=6).GC finished]
>    >    > [SGC for 58 STRING pages..(3663 writable)..(T=7).GC finished]
>    >    > [SGC for 95 SYMBOL pages..(3664 writable)..(T=7).GC finished]
>    >    > [SGC for 58 STRING pages..(3726 writable)..(T=7).GC finished]
>    >    > [SGC for 53 CONTIGUOUS-BLOCKS pages..(3764 writable)..(T=7).GC 
> finished]
>    >    > [SGC for 58 STRING pages..(3814 writable)..(T=8).GC finished]
>    >    > [SGC off][GC for 500 RELOCATABLE-BLOCKS pages..
>    >    > Unrecoverable error: Segmentation violation..
>    >    > 
>    >    > -- Matt
>    >    >    Resent-From: address@hidden
>    >    >    Resent-To: address@hidden
>    >    >    cc: address@hidden, address@hidden, address@hidden
>    >    >    From: "Camm Maguire" <address@hidden>
>    >    >    Date: 27 Aug 2003 16:17:54 -0400
>    >    >    User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>    >    >    X-WSS-ID: 1350D47E1239945-01-01
>    >    >    Content-Type: text/plain;
>    >    >     charset=us-ascii
>    >    > 
>    >    >    Greetings!
>    >    > 
>    >    >    OK, here's the short version:
>    >    > 
>    >    >    It was broken. Now its fixed :-).
>    >    > 
>    >    >    Slightly longer than this, current GCL never marks contiguous 
> pages as
>    >    >    SGC pages, and only sweeps the latter when SGC is on, leading to 
> the
>    >    >    massive leak.  The extra reloc pages in the example put it over 
> the
>    >    >    top.  
>    >    > 
>    >    >    One can of course address this in several ways.  One is to turn 
> off
>    >    >    SGC on contiguous pages with (si::allocate-sgc 'contiguous 0 
> 3000 0).
>    >    >    But this is obviously not optimal.
>    >    > 
>    >    >    Instead I've constructed a patch which implements SGC for 
> contiguous
>    >    >    pages.  Its quite tricky, being close to the most involved 
> change yet
>    >    >    I've made to GCL.  I've tried to document all the details in the
>    >    >    comments.  You can read them in the patch below if you'd like.
>    >    > 
>    >    >    A patch of this import of course needs to be well tested.  All 
> goes
>    >    >    well with maxima, self-build, and ansi thus far.  Am presently 
> testing
>    >    >    the acl2 book certification.  Then it probably needs to be run by
>    >    >    axiom.  I've tried it on the test below using quite a few 
> permutations
>    >    >    of (allocate, allocate-sgc) (contiguous,relblock,cfun(==bignum)),
>    >    >    sgc-on, and even si::SET-GMP-ALLOCATE-RELOCATABLE successfully,
>    >    >    although nothing exhaustive as yet.  
>    >    > 
>    >    >    Just as a reminder, gmp bignums are allocated on contiguous 
> pages by
>    >    >    default, as these reproduce malloc semantics (i.e. they don't 
> move),
>    >    >    and one is thus assured that no caching in the external gmp 
> library
>    >    >    will be corrupted.  Dr. Schelter apparently audited the gmp code 
> at
>    >    >    the point when support for it was added, identifying and removing
>    >    >    precisely one malloc in a bad place with a safe alloca, allowing
>    >    >    bignums to be allocated on faster relocatable pages instead.  I 
> have
>    >    >    never repeated this analysis, but we do overwrite said malloc 
> with the
>    >    >    new alloca even when linking gmp in dynamically.  gmp could 
> introduce
>    >    >    another bad malloc without our noticing conceivably, but as of 
> right
>    >    >    now, relocatable bignums work fine at least in this test.  Of 
> course
>    >    >    building GCL with its own copy of gmp will always work as it ever
>    >    >    has.  (si::set-gmp-allocate-relocatable t) to try it out.
>    >    > 
>    >    >    Separately, several page types had no SGC pages allocated by 
> default,
>    >    >    including bignums, leading to a thrashing of sgc-on, sgc-off in 
> the
>    >    >    test below when the bignum header underwent GC.  I've remedied 
> this
>    >    >    default situation here as well.
>    >    > 
>    >    >    I've not even committed this change yet as it still might need
>    >    >    a few minor adjustments, but it basically appears to be working.
>    >    >    Feedback from GC gurus of course appreciated as always :-).  
> Hammer on
>    >    >    it and find the bugs if you are so inclined!
>    >    > 
>    >    >    To the list -- sorry about being delayed on this time consuming
>    >    >    project, but I feel it takes precedence over things I'd rather 
> get to,
>    >    >    like ansi support.
>    >    > 
>    >    >    Take care,
>    >    > 
>    >    >    
> =============================================================================
>    >    >    Index: h/object.h
>    >    >    
> ===================================================================
>    >    >    RCS file: /cvsroot/gcl/gcl/h/object.h,v
>    >    >    retrieving revision 1.18.4.1
>    >    >    diff -u -r1.18.4.1 object.h
>    >    >    --- h/object.h   16 Jul 2003 02:02:49 -0000      1.18.4.1
>    >    >    +++ h/object.h   27 Aug 2003 19:21:52 -0000
>    >    >    @@ -759,6 +759,7 @@
>    >    >        short   tm_max_grow;    /* max amount to grow when growing */
>    >    >        short   tm_growth_percent;  /* percent to increase maxpages 
> */
>    >    >        short   tm_percent_free;  /* percent which must be free 
> after a gc for this type */
>    >    >    +        short   tm_distinct;       /* pages of this type are 
> distinct */
>    >    > 
>    >    >     };
>    >    > 
>    >    >    Index: h/page.h
>    >    >    
> ===================================================================
>    >    >    RCS file: /cvsroot/gcl/gcl/h/page.h,v
>    >    >    retrieving revision 1.4.4.1
>    >    >    diff -u -r1.4.4.1 page.h
>    >    >    --- h/page.h     21 Aug 2003 04:17:47 -0000      1.4.4.1
>    >    >    +++ h/page.h     27 Aug 2003 19:21:52 -0000
>    >    >    @@ -29,6 +29,12 @@
>    >    >     #define ROUND_UP_PTR(n) (((long)(n) + (PTR_ALIGN-1)) & 
> ~(PTR_ALIGN-1))
>    >    >     #define ROUND_DOWN_PTR(n) (((long)(n)  & ~(PTR_ALIGN-1)))
>    >    > 
>    >    >    +/* alignment required for contiguous pointers */
>    >    >    +#define CPTR_ALIGN (PTR_ALIGN < sizeof(struct contblock) ? 
> sizeof(struct contblock) : PTR_ALIGN)
>    >    >    +
>    >    >    +#define ROUND_UP_PTR_CONT(n)    (((long)(n) + (CPTR_ALIGN-1)) & 
> ~(CPTR_ALIGN-1))
>    >    >    +#define ROUND_DOWN_PTR_CONT(n) (((long)(n)  & ~(CPTR_ALIGN-1)))
>    >    >    +
>    >    > 
>    >    >     #ifdef SGC
>    >    > 
>    >    >    Index: o/alloc.c
>    >    >    
> ===================================================================
>    >    >    RCS file: /cvsroot/gcl/gcl/o/alloc.c,v
>    >    >    retrieving revision 1.19
>    >    >    diff -u -r1.19 alloc.c
>    >    >    --- o/alloc.c    1 Mar 2003 22:37:37 -0000       1.19
>    >    >    +++ o/alloc.c    27 Aug 2003 19:21:52 -0000
>    >    >    @@ -425,9 +425,19 @@
>    >    >     /*
>    >    >        printf("allocating %d-byte contiguous block...\n", n);
>    >    >     */
>    >    >    +         /* SGC cont pages: contiguous pointers must be aligned 
> at
>    >    >    +            CPTR_ALIGN, no smaller than sizeof (struct 
> contblock).
>    >    >    +            Here we allocate a bigger block, and rely on the 
> fact that
>    >    >    +            allocate_page returns pointers appropriately 
> aligned,
>    >    >    +            being also aligned on page boundaries.  Protection 
> against
>    >    >    +            a too small contblock was aforded before by a 
> minimum
>    >    >    +            contblock size enforced by CBMINSIZE in 
> insert_contblock.
>    >    >    +            However, this leads to a leak when many small cont 
> blocks
>    >    >    +            are allocated, e.g. with bignums, so is now 
> removed.  CM
>    >    >    +            20030827 */
>    >    > 
>    >    >        g = FALSE;
>    >    >    -        n = ROUND_UP_PTR(n);
>    >    >    +        n = ROUND_UP_PTR_CONT(n);
>    >    > 
>    >    >     ONCE_MORE:
>    >    >         CHECK_INTERRUPT;
>    >    >    @@ -472,8 +482,16 @@
>    >    >       }
>    >    >        p = alloc_page(m);
>    >    > 
>    >    >    -        for (i = 0;  i < m;  i++)
>    >    >    +        for (i = 0;  i < m;  i++) {
>    >    >                type_map[page(p) + i] = (char)t_contiguous;
>    >    >    +
>    >    >    +                /* SGC cont pages: Before this point, GCL never 
> marked contiguous
>    >    >    +                   pages for SGC, causing no contiguous pages 
> to be
>    >    >    +                   swept when SGC was on.  Here we follow the 
> behavior
>    >    >    +                   for other pages in add_to_freelist. CM 
> 20030827  */
>    >    >    +                if (sgc_enabled && 
> tm_table[t_contiguous].tm_sgc)
>    >    >    +                  sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    >    >    +        }
>    >    >        ncbpage += m;
>    >    >        insert_contblock(p+n, PAGESIZE*m - n);
>    >    >        return(p);
>    >    >    @@ -484,11 +502,17 @@
>    >    > 
>    >    >       struct contblock **cbpp, *cbp;
>    >    > 
>    >    >    -  if (s < CBMINSIZE)
>    >    >    +  /* SGC cont pages: This used to return when s<CBMINSIZE, but 
> we need
>    >    >    +     to be able to sweep small (e.g. bignum) contblocks.  FIXME:
>    >    >    +     should never be called with s<=0 to begin with.  CM 
> 20030827*/
>    >    >    +  if (s<=0)
>    >    >     return;
>    >    >       ncb++;
>    >    >       cbp = (struct contblock *)p;
>    >    >    -  cbp->cb_size = s;
>    >    >    +  /* SGC cont pages: allocated sizes may not be zero mod 
> CPTR_SIZE,
>    >    >    +     e.g. string fillp, but alloc_contblock rounded up the 
> allocation
>    >    >    +     like this, which we follow here.  CM 20030827 */
>    >    >    +  cbp->cb_size = ROUND_UP_PTR_CONT(s);
>    >    >       for (cbpp = &cb_pointer;  *cbpp;  cbpp = &((*cbpp)->cb_link))
>    >    >     if ((*cbpp)->cb_size >= s) {
>    >    >       cbp->cb_link = *cbpp;
>    >    >    @@ -568,19 +592,30 @@
>    >    >        return(p);
>    >    >     }
>    >    > 
>    >    >    +/* Add a tm_distinct field to prevent page type sharing if 
> desired.
>    >    >    +   Not used now, as its never desirable from an efficiency 
> point of
>    >    >    +   view, and as the only known place one must separate is cons 
> and
>    >    >    +   fixnum, which are of different sizes unless PTR_ALIGN is set 
> too
>    >    >    +   high (e.g. 16 on a 32bit machine).  See the ordering of 
> init_tm
>    >    >    +   calls for these types below -- reversing would wind up 
> merging the
>    >    >    +   types with the current algorithm.  CM 20030827 */
>    >    >    +
>    >    >     static void
>    >    >    -init_tm(enum type t, char *name, int elsize, int nelts, int 
> sgc) {
>    >    >    +init_tm(enum type t, char *name, int elsize, int nelts, int 
> sgc,int distinct) {
>    >    > 
>    >    >       int i, j;
>    >    >       int maxpage;
>    >    >       /* round up to next number of pages */
>    >    >       maxpage = (((nelts * elsize) + PAGESIZE -1)/PAGESIZE);
>    >    >       tm_table[(int)t].tm_name = name;
>    >    >    -  for (j = -1, i = 0;  i < (int)t_end;  i++)
>    >    >    -    if (tm_table[i].tm_size != 0 &&
>    >    >    -        tm_table[i].tm_size >= elsize &&
>    >    >    -        (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    >    >    -      j = i;
>    >    >    +  j=-1;
>    >    >    +  if (!distinct)
>    >    >    +    for (i = 0;  i < (int)t_end;  i++)
>    >    >    +      if (tm_table[i].tm_size != 0 &&
>    >    >    +          tm_table[i].tm_size >= elsize &&
>    >    >    +          !tm_table[i].tm_distinct &&
>    >    >    +          (j < 0 || tm_table[j].tm_size > tm_table[i].tm_size))
>    >    >    +        j = i;
>    >    >       if (j >= 0) {
>    >    >     tm_table[(int)t].tm_type = (enum type)j;
>    >    >     tm_table[j].tm_maxpage += maxpage;
>    >    >    @@ -598,6 +633,7 @@
>    >    >       /*tm_table[(int)t].tm_npage = 0; */  /* dont zero nrbpage.. */
>    >    >       tm_table[(int)t].tm_maxpage = maxpage;
>    >    >       tm_table[(int)t].tm_gbccount = 0;
>    >    >    +  tm_table[(int)t].tm_distinct=distinct;
>    >    >     #ifdef SGC      
>    >    >       tm_table[(int)t].tm_sgc = sgc;
>    >    >       tm_table[(int)t].tm_sgc_max = 3000;
>    >    >    @@ -688,40 +724,46 @@
>    >    >       for (i = 0;  i < MAXPAGE;  i++)
>    >    >     type_map[i] = (char)t_other;
>    >    > 
>    >    >    +  /* Unused (at present) tm_distinct flag added.  Note that if 
> cons
>    >    >    +     and fixnum share page types, errors will be introduced.
>    >    >    +
>    >    >    +     Gave each page type at least some sgc pages by default.  Of
>    >    >    +     course changeable by allocate-sgc.  CM 20030827 */
>    >    >    +
>    >    >       init_tm(t_fixnum, "NFIXNUM",
>    >    >    -          sizeof(struct fixnum_struct), 8192,20);
>    >    >    -  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50 );
>    >    >    -  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 
> 5461,0 );
>    >    >    -  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,0  );
>    >    >    -  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,0 );
>    >    >    -  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1  
> );
>    >    >    -  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1 );
>    >    >    -  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1 );
>    >    >    -  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,0 );
>    >    >    -  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,0 );
>    >    >    +          sizeof(struct fixnum_struct), 8192,20,0);
>    >    >    +  init_tm(t_cons, ".CONS", sizeof(struct cons), 65536 ,50,0 );
>    >    >    +  init_tm(t_structure, "SSTRUCTURE", sizeof(struct structure), 
> 5461,1,0 );
>    >    >    +  init_tm(t_cfun, "fCFUN", sizeof(struct cfun), 4096,1,0  );
>    >    >    +  init_tm(t_sfun, "gSFUN", sizeof(struct sfun),409,1,0 );
>    >    >    +  init_tm(t_string, "\"STRING", sizeof(struct string), 5461,1,0 
>  );
>    >    >    +  init_tm(t_array, "aARRAY", sizeof(struct array), 4681,1,0 );
>    >    >    +  init_tm(t_symbol, "|SYMBOL", sizeof(struct symbol), 3640,1,0 
> );
>    >    >    +  init_tm(t_bignum, "BBIGNUM", sizeof(struct bignum), 2730,1,0 
> );
>    >    >    +  init_tm(t_ratio, "RRATIONAL", sizeof(struct ratio), 170,1,0 );
>    >    >       init_tm(t_shortfloat, "FSHORT-FLOAT",
>    >    >    -          sizeof(struct shortfloat_struct), 256 ,1);
>    >    >    +          sizeof(struct shortfloat_struct), 256 ,1,0);
>    >    >       init_tm(t_longfloat, "LLONG-FLOAT",
>    >    >    -          sizeof(struct longfloat_struct), 170 ,0);
>    >    >    -  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 
> ,0);
>    >    >    -  init_tm(t_character,"#CHARACTER",sizeof(struct character), 
> 256 ,0);
>    >    >    -  init_tm(t_package, ":PACKAGE", sizeof(struct package), 
> 2*PAGESIZE / sizeof(struct package),0);
>    >    >    -  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 
> 78,0 );
>    >    >    -  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,0);
>    >    >    -  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 
> 73 ,0);
>    >    >    -  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,0);
>    >    >    -  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 
> ,0);
>    >    >    -  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 
> 256 ,0);
>    >    >    -  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 
> ,0);
>    >    >    -  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 
> ,0);
>    >    >    -  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 
> ,0);
>    >    >    -  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,0);
>    >    >    -  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,0);
>    >    >    -  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,0);
>    >    >    -  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,0);
>    >    >    -  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,0);
>    >    >    -  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20);
>    >    >    -  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20);
>    >    >    +          sizeof(struct longfloat_struct), 170 ,1,0);
>    >    >    +  init_tm(t_complex, "CCOMPLEX", sizeof(struct complex), 170 
> ,1,0);
>    >    >    +  init_tm(t_character,"#CHARACTER",sizeof(struct character), 
> 256 ,1,0);
>    >    >    +  init_tm(t_package, ":PACKAGE", sizeof(struct package), 
> 2*PAGESIZE / sizeof(struct package),1,0);
>    >    >    +  init_tm(t_hashtable, "hHASH-TABLE", sizeof(struct hashtable), 
> 78,1,0 );
>    >    >    +  init_tm(t_vector, "vVECTOR", sizeof(struct vector), 146 ,1,0);
>    >    >    +  init_tm(t_bitvector, "bBIT-VECTOR", sizeof(struct bitvector), 
> 73 ,1,0);
>    >    >    +  init_tm(t_stream, "sSTREAM", sizeof(struct stream), 78 ,1,0);
>    >    >    +  init_tm(t_random, "$RANDOM-STATE", sizeof(struct random), 256 
> ,1,0);
>    >    >    +  init_tm(t_readtable, "rREADTABLE", sizeof(struct readtable), 
> 256 ,1,0);
>    >    >    +  init_tm(t_pathname, "pPATHNAME", sizeof(struct pathname), 73 
> ,1,0);
>    >    >    +  init_tm(t_cclosure, "cCCLOSURE", sizeof(struct cclosure), 85 
> ,1,0);
>    >    >    +  init_tm(t_closure, "cCLOSURE", sizeof(struct cclosure), 85 
> ,1,0);
>    >    >    +  init_tm(t_vfun, "VVFUN", sizeof(struct vfun), 102 ,1,0);
>    >    >    +  init_tm(t_gfun, "gGFUN", sizeof(struct sfun), 0 ,1,0);
>    >    >    +  init_tm(t_afun, "AAFUN", sizeof(struct sfun), 0 ,1,0);
>    >    >    +  init_tm(t_cfdata, "cCFDATA", sizeof(struct cfdata), 102 ,1,0);
>    >    >    +  init_tm(t_spice, "!SPICE", sizeof(struct spice), 4096 ,1,0);
>    >    >    +  init_tm(t_relocatable, "%RELOCATABLE-BLOCKS", 1000,0,20,0);
>    >    >    +  init_tm(t_contiguous, "_CONTIGUOUS-BLOCKS", 1001,0,20,0);
>    >    >       tm_table[t_relocatable].tm_nppage = PAGESIZE;
>    >    >       tm_table[t_contiguous].tm_nppage = PAGESIZE;
>    >    > 
>    >    >    Index: o/gbc.c
>    >    >    
> ===================================================================
>    >    >    RCS file: /cvsroot/gcl/gcl/o/gbc.c,v
>    >    >    retrieving revision 1.13.4.1
>    >    >    diff -u -r1.13.4.1 gbc.c
>    >    >    --- o/gbc.c      30 Jul 2003 15:11:12 -0000      1.13.4.1
>    >    >    +++ o/gbc.c      27 Aug 2003 19:21:52 -0000
>    >    >    @@ -1012,19 +1012,24 @@
>    >    >     e = pagetochar(j);
>    >    >     for (p = s;  p < e;) {
>    >    >       if (get_mark_bit((int *)p)) {
>    >    >    -        p += PTR_ALIGN;
>    >    >    +        /* SGC cont pages: cont blocks must be no smaller than
>    >    >    +           sizeof(struct contblock), and must not have a sweep
>    >    >    +           granularity greater than this amount (e.g. 
> CPTR_ALIGN) if
>    >    >    +           contblock leaks are to be avoided.  Used to be 
> aligned at
>    >    >    +           PTR_ALIGN. CM 20030827 */
>    >    >    +        p += CPTR_ALIGN;
>    >    >        continue;
>    >    >       }
>    >    >    -      q = p + PTR_ALIGN;
>    >    >    +      q = p + CPTR_ALIGN;
>    >    >       while (q < e) {
>    >    >        if (!get_mark_bit((int *)q)) {
>    >    >    -          q += PTR_ALIGN;
>    >    >    +          q += CPTR_ALIGN;
>    >    >          continue;
>    >    >        }
>    >    >        break;
>    >    >       }
>    >    >       insert_contblock(p, q - p);
>    >    >    -      p = q + PTR_ALIGN;
>    >    >    +      p = q + CPTR_ALIGN;
>    >    >     }
>    >    >     i = j + 1;
>    >    >       }
>    >    >    @@ -1067,8 +1072,8 @@
>    >    >     if(sgc_enabled) sgc_quit();
>    >    > 
>    >    >     }
>    >    >    -  
>    >    >    -  
>    >    >    +
>    >    >    +
>    >    >     #ifdef DEBUG
>    >    >       debug = symbol_value(sSAgbc_messageA) != Cnil;
>    >    >     #endif
>    >    >    @@ -1423,8 +1428,10 @@
>    >    >       if (!MAYBE_DATA_P(p) || (enum type)type_map[page(p)] != 
> t_contiguous)
>    >    >     return;
>    >    >       q = p + s;
>    >    >    -  x = (int *)ROUND_DOWN_PTR(p);
>    >    >    -  y = (int *)ROUND_UP_PTR(q);
>    >    >    +  /* SGC cont pages: contblock pages must be no smaller than
>    >    >    +     sizeof(struct contblock).  CM 20030827 */
>    >    >    +  x = (int *)ROUND_DOWN_PTR_CONT(p);
>    >    >    +  y = (int *)ROUND_UP_PTR_CONT(q);
>    >    >       for (;  x < y;  x++)
>    >    >     set_mark_bit(x);
>    >    >     }
>    >    >    Index: o/sgbc.c
>    >    >    
> ===================================================================
>    >    >    RCS file: /cvsroot/gcl/gcl/o/sgbc.c,v
>    >    >    retrieving revision 1.9
>    >    >    diff -u -r1.9 sgbc.c
>    >    >    --- o/sgbc.c     15 Feb 2003 00:38:28 -0000      1.9
>    >    >    +++ o/sgbc.c     27 Aug 2003 19:21:53 -0000
>    >    >    @@ -887,19 +887,24 @@
>    >    >     e = pagetochar(j);
>    >    >     for (p = s;  p < e;) {
>    >    >       if (get_mark_bit((int *)p)) {
>    >    >    -        p += PTR_ALIGN;
>    >    >    +        /* SGC cont pages: cont blocks must be no smaller than
>    >    >    +           sizeof(struct contblock), and must not have a sweep
>    >    >    +           granularity greater than this amount (e.g. 
> CPTR_ALIGN) if
>    >    >    +           contblock leaks are to be avoided.  Used to be 
> aligned at
>    >    >    +           PTR_ALIGN. CM 20030827 */
>    >    >    +        p += CPTR_ALIGN;
>    >    >        continue;
>    >    >       }
>    >    >    -      q = p + PTR_ALIGN;
>    >    >    +      q = p + CPTR_ALIGN;
>    >    >       while (q < e) {
>    >    >        if (!get_mark_bit((int *)q)) {
>    >    >    -          q += PTR_ALIGN;
>    >    >    +          q += CPTR_ALIGN;
>    >    >          continue;
>    >    >        }
>    >    >        break;
>    >    >       }
>    >    >       insert_contblock(p, q - p);
>    >    >    -      p = q + PTR_ALIGN;
>    >    >    +      p = q + CPTR_ALIGN;
>    >    >     }
>    >    >     i = j + 1;
>    >    >       }
>    >    >    @@ -961,6 +966,11 @@
>    >    >       return count;
>    >    >     }
>    >    > 
>    >    >    +   /* SGC cont pages: After SGC_start, old_cb_pointer will be a 
> linked
>    >    >    +   list of free blocks on non-SGC pages, and cb_pointer will be
>    >    >    +   likewise for SGC pages.  CM 20030827*/
>    >    >    +static struct contblock *old_cb_pointer;
>    >    >    +
>    >    >     int
>    >    >     sgc_start(void) {
>    >    > 
>    >    >    @@ -1005,7 +1015,10 @@
>    >    >               count);fflush(stdout);
>    >    >     #endif       
>    >    >       for(j=0,count=0; j <= maxp ;j++) {
>    >    >    -        if (free_map[j] >= minfree) {
>    >    >    +        /* SGC cont pages: This used to be >=, which is a 
> definite
>    >    >    +           bug, as minfree could be zero, leading this type to 
> claim
>    >    >    +           SGC pages not of its type in type_map.  CM 20030827*/
>    >    >    +        if (free_map[j] > minfree) {
>    >    >          sgc_type_map[j] |= (SGC_PAGE_FLAG | SGC_TEMP_WRITABLE);
>    >    >          ++count;
>    >    >          if (count >= tm->tm_sgc_max)
>    >    >    @@ -1031,6 +1044,101 @@
>    >    >          goto FIND_FREE_PAGES;       
>    >    >       }
>    >    >     }
>    >    >    +
>    >    >    +/* SGC cont pages: Here we implement the contblock page 
> division into
>    >    >    +   SGC and non-SGC types.  Unlike the other types, we need 
> *whole*
>    >    >    +   free pages for contblock SGC, as there is no psersistent data
>    >    >    +   element (e.g. .m) on an allocated block itself which can 
> indicate
>    >    >    +   its live status.  If anything on a page which is to be marked
>    >    >    +   read-only points to a live object on an SGC cont page, it 
> will
>    >    >    +   never be marked and will be erroneously swept.  It is also 
> possible
>    >    >    +   for dead objects to unnecessarily mark dead regions on SGC 
> pages
>    >    >    +   and delay sweeping until the pointing type is GC'ed if SGC is
>    >    >    +   turned off for the pointing type, e.g. tm_sgc=0. (This was 
> so by
>    >    >    +   default for a number of types, including bignums, and has 
> now been
>    >    >    +   corrected in init_alloc in alloc.c.) We can't get around this
>    >    >    +   AFAICT, as old data on (writable) SGC pages must be marked 
> lest it
>    >    >    +   is lost, and (old) data on now writable non-SGC pages might 
> point
>    >    >    +   to live regions on SGC pages, yet might not themselves be 
> reachable
>    >    >    +   from the mark origin through an unbroken chain of writable 
> pages.
>    >    >    +   In any case, the possibility of a lot of garbage marks on 
> contblock
>    >    >    +   pages, especially when the blocks are small as in bignums, 
> makes
>    >    >    +   necessary the sweeping of minimal contblocks to prevent 
> leaks. CM
>    >    >    +   20030827 */
>    >    >    +  {
>    >    >    +    void *p=NULL;
>    >    >    +    unsigned i,j,k,count;
>    >    >    +    struct contblock 
> *new_cb_pointer=NULL,*tmp_cb_pointer=NULL,**cbpp;
>    >    >    +
>    >    >    +    tm=tm_of(t_contiguous);
>    >    >    +
>    >    >    +    /* SGC cont pages:  First count whole free pages available. 
>  CM 20030827 */
>    >    >    +    for (cbpp=&cb_pointer,count=0;*cbpp;cbpp=&(*cbpp)->cb_link) 
> {
>    >    >    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    >    >    +      k=p-((void *)(*cbpp));
>    >    >    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) 
>    >    >    +        continue;
>    >    >    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    >    >    +      count+=i;
>    >    >    +    }
>    >    >    +    count=tm->tm_sgc>count ? tm->tm_sgc - count : 0;
>    >    >    +
>    >    >    +    if (count>0) {
>    >    >    +      /* SGC cont pages: allocate more if necessary, dumping 
> possible
>    >    >    +         GBC freed pages onto the old contblock list.  CM 
> 20030827*/
>    >    >    +      p=alloc_contblock(count*PAGESIZE);
>    >    >    +      tmp_cb_pointer=cb_pointer;
>    >    >    +      cb_pointer=new_cb_pointer;
>    >    >    +      /* SGC cont pages: add new pages to new contblock list. p 
> is not
>    >    >    +         already on any list as ensured by alloc_contblock.  CM
>    >    >    +         20030827 */
>    >    >    +      insert_contblock(p,PAGESIZE*count);
>    >    >    +      new_cb_pointer=cb_pointer;
>    >    >    +      cb_pointer=tmp_cb_pointer;
>    >    >    +      for (i=0;i<count;i++) 
>    >    >    +        sgc_type_map[page(p)+i]|= SGC_PAGE_FLAG;
>    >    >    +    }
>    >    >    +
>    >    >    +    for (cbpp=&cb_pointer;*cbpp;) {
>    >    >    +      p=PAGE_ROUND_UP((void *)(*cbpp));
>    >    >    +      k=p-((void *)(*cbpp));
>    >    >    +      if ((*cbpp)->cb_size<k || (*cbpp)->cb_size-k<PAGESIZE) {
>    >    >    +        cbpp=&(*cbpp)->cb_link;
>    >    >    +        continue;
>    >    >    +      }
>    >    >    +      i=((*cbpp)->cb_size-k)/PAGESIZE;
>    >    >    +      i*=PAGESIZE;
>    >    >    +      j=(*cbpp)->cb_size-i-k;
>    >    >    +      /* SGC contblock pages:  remove this block from old list 
> CM 20030827 */
>    >    >    +      *cbpp=(*cbpp)->cb_link;
>    >    >    +      /* SGC contblock pages:  add fragments old list CM 
> 20030827 */
>    >    >    +      if (k) {
>    >    >    +        ncb--;
>    >    >    +        insert_contblock(p-k,k);
>    >    >    +      }
>    >    >    +      if (j) {
>    >    >    +        ncb--;
>    >    >    +        insert_contblock(p+i,j);
>    >    >    +      }
>    >    >    +      tmp_cb_pointer=cb_pointer;
>    >    >    +      cb_pointer=new_cb_pointer;
>    >    >    +      /* SGC contblock pages: add whole pages to new list, p 
> p-k, and
>    >    >    +         p+i are guaranteed to be distinct when used. CM 
> 20030827 */
>    >    >    +      insert_contblock(p,i);
>    >    >    +      new_cb_pointer=cb_pointer;
>    >    >    +      cb_pointer=tmp_cb_pointer;
>    >    >    +      i/=PAGESIZE;
>    >    >    +      for (j=0;j<i;j++)
>    >    >    +        sgc_type_map[page(p)+j]|= SGC_PAGE_FLAG;
>    >    >    +    }
>    >    >    +
>    >    >    +    /* SGC contblock pages: switch to new free SGC contblock 
> list. CM
>    >    >    +       20030827 */
>    >    >    +    old_cb_pointer=cb_pointer;
>    >    >    +    cb_pointer=new_cb_pointer;
>    >    >    +
>    >    >    +  }
>    >    >    +
>    >    >       /* Now  allocate the sgc relblock.   We do this as the tail
>    >    >      end of the ordinary rb.     */  
>    >    >       {
>    >    >    @@ -1117,6 +1225,22 @@
>    >    >     return 0;
>    >    >       sgc_enabled=0;
>    >    >       rb_start = old_rb_start;
>    >    >    +
>    >    >    +  /* SGC cont pages: restore contblocks, each tmp_cb_pointer 
> coming
>    >    >    +     from the new list is guaranteed not to be on the old. Need 
> to
>    >    >    +     grab 'next' before insert_contblock writes is.  CM 
> 20030827 */
>    >    >    +  {
>    >    >    +    struct contblock *tmp_cb_pointer,*next;
>    >    >    +    if (old_cb_pointer) {
>    >    >    +      tmp_cb_pointer=cb_pointer;
>    >    >    +      cb_pointer=old_cb_pointer;
>    >    >    +      for (;tmp_cb_pointer;  tmp_cb_pointer=next) {
>    >    >    +        next=tmp_cb_pointer->cb_link;
>    >    >    +        insert_contblock((void 
> *)tmp_cb_pointer,tmp_cb_pointer->cb_size);
>    >    >    +      }
>    >    >    +    }
>    >    >    +  }
>    >    >    +
>    >    >       for (i= t_start; i < t_contiguous ; i++)
>    >    >     if (TM_BASE_TYPE_P(i)) {
>    >    >       tm=tm_of(i);
>    >    >    
> =============================================================================
>    >    > 
>    >    >    Matt Kaufmann <address@hidden> writes:
>    >    > 
>    >    >    > Hi, Camm --
>    >    >    > 
>    >    >    > Below is an example where GCL 2.5.0 reports the following:
>    >    >    > 
>    >    >    >   Error: Contiguous blocks exhausted.
>    >    >    >         Currently, 29486 pages are allocated.
>    >    >    >         Use ALLOCATE-CONTIGUOUS-PAGES to expand the space.
>    >    >    >   Fast links are on: do (si::use-fast-links nil) for debugging
>    >    >    > 
>    >    >    > In fact, GCL appears to go into an infinite loop at this 
> point, until getting
>    >    >    > to this:
>    >    >    > 
>    >    >    >   Error: Caught fatal error [memory may be damaged]
>    >    >    >   Fast links are on: do (si::use-fast-links nil) for debugging
>    >    >    >   Error signalled by SYSTEM:UNIVERSAL-ERROR-HANDLER.
>    >    >    >   Broken at SYSTEM:UNIVERSAL-ERROR-HANDLER.  Type :H for Help.
>    >    >    >   >>
>    >    >    > 
>    >    >    > The following six forms cause the error to happen.  However, 
> if either of the
>    >    >    > first two forms is omitted, then the error goes away.  Is this 
> expected
>    >    >    > behavior?  This came up because an ACL2 user got the above 
> error using the file
>    >    >    > test3.lisp shown below.  It turns out that GCL si::sgc-on is 
> called before the
>    >    >    > ACL2 image is saved, and that si::*top-level-hook* is set to 
> call
>    >    >    > si::allocate-relocatable-pages when ACL2 is started up.
>    >    >    > 
>    >    >    > (si::sgc-on t)
>    >    >    > (si::allocate-relocatable-pages 500)
>    >    >    > (in-package "USER")
>    >    >    > (compile-file "test3.lisp") ; test3.lisp is shown below
>    >    >    > (load "test3")
>    >    >    > (testfun 1000000 3)
>    >    >    > 
>    >    >    > ++++++++++++++++++++++++++++++ test3.lisp 
> ++++++++++++++++++++++++++++++
>    >    >    > 
>    >    >    > (in-package 'user)
>    >    >    > (defconstant *A* #x5A39BFA0E42A3D15)
>    >    >    > (defconstant *M* (expt 2 63))
>    >    >    > (defconstant *C* 1)
>    >    >    > 
>    >    >    > 
>    >    >    > (defun genseed (seed)
>    >    >    >   (mod (+ (* *A* seed) *C*) *M*))
>    >    >    > 
>    >    >    > 
>    >    >    > (defun testfun (n seed)
>    >    >    >   (if (or (not (integerp n)) (<= n 0))
>    >    >    >       seed
>    >    >    >       (let* ((s0 (genseed seed))
>    >    >    >            (s1 (genseed s0)))
>    >    >    >       (testfun (1- n) s1))))
>    >    >    > 
>    >    >    > 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>    >    >    > 
>    >    >    > Thanks --
>    >    >    > -- Matt
>    >    >    > 
>    >    >    > 
>    >    >    > 
>    >    > 
>    >    >    -- 
>    >    >    Camm Maguire                                             
> address@hidden
>    >    >    
> ==========================================================================
>    >    >    "The earth is but one country, and mankind its citizens."  --  
> Baha'u'llah
>    >    > 
>    >    > 
>    >    > 
>    >    > _______________________________________________
>    >    > Gcl-devel mailing list
>    >    > address@hidden
>    >    > http://mail.gnu.org/mailman/listinfo/gcl-devel
>    >    > 
>    >    > 
>    >    > 
>    > 
>    >    -- 
>    >    Camm Maguire                                          address@hidden
>    >    
> ==========================================================================
>    >    "The earth is but one country, and mankind its citizens."  --  
> Baha'u'llah
>    > 
>    > 
>    > 
>    > 
> 
>    -- 
>    Camm Maguire                                               address@hidden
>    ==========================================================================
>    "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]