This is a matter for much religious argument, although in cases like the kernel it's probably not a significant use of time or resources. Reference counting can be bug-prone, if you aren't using a language like C++ where it can be entirely automated. It is deterministic, uses very small slices per iteration, and works well at interrupt level. Even with reference counting, GC may be necessary to take care of a circular reference.
I prefer a double-indirect system with reference counting and occasional GC, because it can resolve the fragmentation problem. CPUs could be built to optimize this similarly to the way they handle TLBs.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds