[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How much memory for bignum or other large data structure?
- To: Robert Elton Maas <REM%IMSSS@SAIL.Stanford.EDU>
- Subject: Re: How much memory for bignum or other large data structure?
- From: Dan Hoey <hoey@nrl-aic.ARPA>
- Date: Thu, 16 Apr 1987 20:16:00 -0000
- Cc: firstname.lastname@example.org
- In-reply-to: Robert Elton Maas's message of Thu, 16 Apr 87 154955 est
Date: Thu, 16 Apr 87 15:49:55 est
From: Robert Elton Maas <REM%IMSSS@SAIL.Stanford.EDU>
A program can be aware of how close it is getting to using all
available memory (address space, swap space, etc.) by means of calls
to the LISP (CL) system, and adjust its behaviour accordingly to avoid
actually reaching the absolute limit.
The hard part is actually defining portably how to do this. I can
imagine it might be hard for some systems to implement a function to
answer ``I want to make 50 100k-bit bignums, 100 10k fixnum-arrays, and
maybe 10K of conses, is there space?''. Comments from implementors?
Maybe the function should take a key like :VERY-MUCH to request GC if
Then again, a negative answer to this query might be less than useful
if the reason is that the system doesn't support 10k fixnum arrays.
And I don't favor adding a ton of hair to allow the system to answer
some of the fine-grained questions Maas proposes. In particular
<STS> ... there would be a lot of extra parameters.
Yes, but compared to the total memory available the limit parameters
would be insignificant in size, thus no problem.
I'm concerned about the space consumed in the bookshelf and interaural
<DH> Date: 16 Apr 1987 14:19:04 EST (Thu)
<DH> From: Dan Hoey <hoey@nrl-aic.ARPA>
<DH> Simpler would be to use ARRAY-TOTAL-SIZE-LIMIT for this value.
I don't understand this proposal.
I was not proposing addition of runtime-related storage information,
because that has so far remained outside of CL's scope (unless someone
out there actually has MAKE-ARRAY (and CONS?) side-effect
ARRAY-TOTAL-SIZE-LIMIT). What I advocate is that *if* some
implementation has a representational limit on BIGNUMS, it should be
required to provide it. And rather than add the 776th symbol to LISP
(we may be running out!), I suggested using the same limit that
guarantees the size of a bit vector. The system may be able to make a
larger bignum than ARRAY-TOTAL-SIZE-LIMIT, but the same is true of bit
vectors. What I want the parameters for is to determine whether a
given implementation is a toy or a system.