Marcus Crestani wrote:
More information about the dynarr object: Dynamic arrays are
extensively used for separately allocated objects. In the old garbage
collector, dynamic arrays held non-Lisp objects as well as Lisp
objects. The new incremental garbage collector distinguishes between
dynamic arrays that hold Lisp objects and dynamic arrays that hold
non-Lisp objects. For dynamic arrays that hold Lisp objects, I
created the new Lisp object type "Dynamic Lisp Array," called
dynarr_lisp. It contains Lisp objects, in contrast to the dynamic
array dynarr that contains non-Lisp objects.
For dynamic Lisp arrays, the allocator has to be extended: I added two
more primitives to the new allocator to allow allocation of elements
in a contiguous block of memory: mc_alloc_array and
alloc_lrecord_array. Each element in the array is a regular Lisp
object with its own Lisp object header and mark bit.
Marcus, does this mean it's possible to allocate an array of Lisp
Objects (i.e. pointers, not an array of actual objects themselves),
with a pointer to it from a Lisp Object, and have it handled properly by
kkcc/mc-alloc/new-gc? This would solve many of the problems of my char
table. ideally, this could work recursively -- you could allocate an
array of pointers to arrays of Lisp Objects and have new-gc and friends
handle this upper array as well. but even if i can do this just at the
lowest level, it will be a big win, since that's where most of the
subtables will occur. "handled properly by kkcc" means that kkcc
recognizes if it's seen this array before and doesn't retraverse it if so.
ben