Yes, I'm the king of renaming subject lines.
> IMO the time for real GC in game engines is just about ripe.
I concur.
> Reference counting via smart pointers is not unheard of in
> C++ game engines, and and OCaml-like GC should be a big
> improvement over ref counting.
The problem is that systems with arbitrary pointers a ref-count system
can lead to really sloppy allocation and deletion patterns. This can
cause harsh memory fragmentation, which in turns leads to serious
problems for games that need very long up times (e.g. servers).
With a real GC system and opaque references then it should be able to
compact behind the scenes, alleviating this problem. With a ref-count
system, you'll have to overload new, delete, etc. to make sure that
everything is done through the appropriate managed heaps, which adds yet
more complexity for the programmer to deal with.
Brian
|