[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
10.2 Memory efficiency
In order to save memory allocations, CLN implements:
-
Object sharing: An operation like
x+0
returnsx
without copying it. - Garbage collection: A reference counting mechanism makes sure that any number object’s storage is freed immediately when the last reference to the object is gone.
-
Small integers are represented as immediate values instead of pointers
to heap allocated storage. This means that integers
>= -2^29
,< 2^29
don’t consume heap memory, unless they were explicitly allocated on the heap.
This document was generated on August 27, 2013 using texi2html 5.0.