Re:Rust for C++ programmers – part 4: unique pointers
by pjmlp on Tuesday April 29, 2014 @02:15PM
(#7668920)
What does it have to do with VMs, though?
There are lots of languages with native code generation compilers that have GC[1] support.
Since the Xerox PARC days there have been system programming languages with automatic memory management (Cedar, Interlisp, Modula-3, Oberon, ....).
They were just ignored by the mainstream OS vendors, that were busy creating UNIX System V and VMS clones.
[1] RC is usually GC chapter 1 in CS books.
See figure 3 of this wonderful but terrifying paper:
http://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
(Caveat: that was published in 2005, and garbage collection has improved since then. However, i doubt it has improved enough to invalidate its conclusions.)
The best collector there needed ~3x as much memory as a (admittedly superhumanly perfect) manually memory management to get to a competitive speed.
There are plenty of problems where that memory is available. But there are plenty where it is not. I can justify giving loads of memory to the application that makes my company money. I can't justify giving it to some tiny little log shipper or message forwarder or other random system utility that i want to run on every machine in my infrastructure.