🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.scheme.c
Article #59

Large heap (>16MB) question

#59
From: Chris Hanson
Date: Wed, 09 May 1990 09:21
50 lines
2895 bytes
   Date: 9 May 90 07:21:46 GMT
   From: eos!shelby!cis!ruf@ames.arpa  (Erik Ruf)

   I'm running CScheme 7(beta) on HP9000/350's, using the compiled
   runtime system and the Liar compiler.  My problem is that, by default,
   the system uses only 24 address bits, limiting me to a 16MB heap (i.e.
   1 mega-cons) which is (unfortunately) too small for my current
   application (yes, I know that's a lot of memory, but it's true).

   I need a larger address space.  What do I need to change to make this
   happen?  It seems that I can recompile without setting the
   Heap_In_Low_Memory flag, which will move the tags out of the address,
   and give me a 32-bit address.  I have two questions about this method:

Disabling `Heap_In_Low_Memory' does not change the number of address
bits, it only changes how they are interpreted -- and at a significant
performance penalty.  When this flag is not set, Scheme assumes that
the address part of an object is a byte offset from a base address
that is initialized when Scheme is started.  Every memory reference
thus has extra instructions to add this base address to the byte
offset.

In your case, the savings will be minimal: the only additional space
gained is that occupied by the C code and its static data.

   1. Will it work?  (i.e. is setting "hp9k300" compatible with not
   setting "Heap_In_Low_Memory", or are there other dependencies that
   will break it?).

It should work, but I wouldn't suggest it.

   2. If it does work, will the compiled runtime and the Liar compiler
   continue to work, or are they dependent on the address encoding?  Is
   there any way for me to get a larger address space without being
   forced back into interpreted code?

The compiled code won't work unless `Heap_In_Low_Memory' is set.

   Also, will using "bchscheme" help me at all?  It would free up the
   spare heap's worth of memory, but wouldn't the spare address bit I
   gain by this simply be used up for pointing into the disk storage?

Using `bchscheme' does give you extra space -- the disk storage is not
part of your address space.  However, you won't get an extra address
bit -- you only double the amount of heap space available -- because
the space used to hold Scheme code and C code is not part of the heap.

The next distribution of Scheme (don't ask when) has a 26-bit address
space, which should alleviate your problem.
Technical Details
Message-ID: <9005090920.AA18635@zurich.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!ZURICH.AI.MIT.EDU!cph
References: <RUF.90May9002147@dolores.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!ZURICH.AI.MIT.EDU!cph
From: cph@ZURICH.AI.MIT.EDU (Chris Hanson)
Newsgroups: comp.lang.scheme.c
Subject: Large heap (>16MB) question
Message-ID: <9005090920.AA18635@zurich.ai.mit.edu>
Date: 9 May 90 09:21:09 GMT
References: <RUF.90May9002147@dolores.Stanford.EDU>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 50