Re:For Better Computing, Liberate CPUs from Garbage Collection
by c-cube on Thursday May 09, 2019 @01:48PM
(#19870444)
What if your domain problem (say, compilers, symbolic algorithms) doesn't have a clear notion of ownership because everything is a shared DAG that may survive for arbitrarily long? Not every problem has clear ownership imho (and tools in C or C++ in these domains resort to their own refcount/custom GC implementation anyway).
[ Parent
| on HN ]
Re:For Better Computing, Liberate CPUs from Garbage Collection
by holy_city on Thursday May 09, 2019 @02:05PM
(#19870605)
imo you solve these problems by segregating the ownership logic and relationship logic of the data structure.
In other words the DAG would never be traversed to allocate or free memory, each vertex would be held by a vector or other container and the edges represented by an adjacency list/matrix.
It's faster and safer than pointer chasing.