On Sunday, 5 January 2014 at 02:08:56 UTC, Jeroen Bollen wrote: > As GC.malloc returns a pointer, how does it know when it should > garbage collect the allocated space? The gc keeps track of the size and scans memory for any pointer into the region. If there's none, it collects it.