1. A method for facilitating garbage collection (GC) in a memory-management system that supports both mark-sweep (MS) objects and reference-counted (RC) objects, wherein both MS objects and RC objects can be marked and have a reference count, the method comprising: during a marking phase of a GC operation, identifying roots for the GC operation, marking referents of the roots, and recursively traversing referents of the roots which are MS objects and while doing so, marking referents of the traversed MS objects; and during a subsequent sweeping phase of the GC operation, reclaiming objects that are unmarked and have a zero reference count.