MPS issue job003919

TitleNo interface for getting bytes allocated
Assigned userGareth Rees
DescriptionTo implement the Common Lisp TIME macro [1], Clasp would like to output the number of bytes consed. [2] The MPS does not have an interface to this.
AnalysisThe problem for the MPS is that the number of bytes allocated and freed grows without limit. This means that the MPS cannot store it in a fixed size field. Possible solution approaches are:

1. Store these numbers using bignums. But bignums require allocation, and what would the MPS do if this fails?

2. Store these numbers modulo 2**64. (Accepting wrap-around but possibly good enough for some use cases.)

3. Store these numbers as double-precision floating point numbers. (Accepting loss of precision beyong 2**53 but again, possibly good enough for some use cases.)

4. Let the customer solve the problem using the bignums in their own language.
How foundcustomer
Created byGareth Rees
Created on2015-07-01 16:21:51
Last modified byGareth Rees
Last modified on2018-06-27 13:12:03
History2015-07-01 GDR Created.