[comp.lang.forth] ANS Forth Extension wordset

wmb@MITCH.ENG.SUN.COM (07/06/90)

> Furthermore, I would like to support the inclusion of   Collect
> into the memory allocation extension wordset.

I presume that COLLECT would perform some sort of garbage collection?
If so, I'm not sure that it is applicable.  The memory allocation
wordset provides a rather primitive mechanism for acquiring memory
from the host operating system, rather than a dynamically-relocatable
heap.  Thus it is not possible to rearrrange such memory "on the fly".
Furthermore, the wordset places no restrictions on what the application
does with the addresses (i.e. they are not constrained to be left on
the stack, or to be stored in variables in any particular way), so it
is not in general possible for the system to determine whether or not
the application still has a reference to any particular piece of allocated
memory.

Garbage collection could be provided as part of a more sophisticated
memory allocation scheme that could be built on top of the primitive
interface.

Mitch