Title | No interface for getting bytes allocated |
Status | open |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | To 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. |
Analysis | The 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 found | customer |
Evidence | [1] http://clhs.lisp.se/Body/m_time.htm [2] https://info.ravenbrook.com/mail/2015/06/30/16-51-26/0/ |
Created by | Gareth Rees |
Created on | 2015-07-01 16:21:51 |
Last modified by | Gareth Rees |
Last modified on | 2018-06-27 13:12:03 |
History | 2015-07-01 GDR Created. |