> But then, after you have accounted for all the corner cases, you have reimplemented half of a garbage collector, badly ;)
Ha! manual allocation has two properties that most GCs don't have:
-"real time": time is only spent when you call malloc or free, many GCs can interrupt your software "randomly".
-swap friendly: as the GC access periodically the objects, it interacts with the swap manager, keeping the objects in memory longer than they ought to be.