AutoZone: The Objective-C Garbage Collector

The source code for AutoZone, the Objective-C Garbage Collector found in Mac OS X Leopard, is now available. It has been released under the Apache v2 license.

This is the same collector that is found in Mac OS X Leopard 10.5.3 (the collector was not updated as a part of 10.5.4 or 10.5.5).

The garbage collector is not limited to Objective-C. It is actually a fairly generic scanning, conservative, generational, multi-threaded, language agnostic, collector. The implementation has certainly been tested and optimized with Mac OS X based applications.

Notably, MacRuby uses AutoZone to offer a common GC implementation across object graphs that span Ruby and Objective-C.



16 Responses to “AutoZone: The Objective-C Garbage Collector”

  1. Ian Baird says:

    Excellent work! Apple continues to push the state of the art and provides a great example of how to share with the community. Much like the WebKit which has flourished far and wide, I expect this technology to show up in interesting places.

    Yet another reason why I love being a developer for Apple’s products.

    - Ian Baird

  2. Michael Tsai - Blog - AutoZone Source says:

    [...] The source code for AutoZone, Apple’s Objective-C garbage collector, is now available (via Bill Bumgarner): [...]

  3. Christopher Lloyd says:

    Wow, nice.

  4. Russell Finn says:

    I’ve been hearing a lot of noise about MacRuby lately. Are you aware of any similar development project for Python (i.e. hosting Python on the Objective-C runtime)? I’d be interested in contributing to such a project.

  5. bbum says:

    I’m not aware of any such project, but would love to see one happen. IronPython is an example of the pattern, but that appears to be a full rewrite.

    Unfortunately, Python has carried along a tremendous amount of legacy cruft. Thus, there is a huge amount of pretty gnarly legacy code and modules throughout the source. Rehosting Python objects on top of CF, Objective-C and AutoZone would be considerably more difficult to make compatible with the mainline of Python.

    Frankly, I’m not sure that is such a bad thing. From what I can tell, Python is ripe for forking. A modern variant that ditched the tons of legacy crap, cleaned up the libraries, and fixed the threading issues could be quite viable.

  6. Apple Releases Leopard Garbage Collector as Open Source says:

    [...] Bill Bumgarner’s weblog-o-mat [...]

  7. Jon R says:

    Perhaps PyPy could be helpful for that…

  8. Tim says:

    @Russell Finn

    I think you should check out PyObjC

  9. Mac Fan Boy » AutoZone: The Objective-C Garbage Collector says:

    [...] bbum’s weblog-o-mat » Blog Archive » AutoZone: The Objective-C Garbage Collector. [...]

  10. AutoZone, the Objective-C Garbage Collector | Thetroubleshooting Blog says:

    [...] AutoZone, the Objective-C Garbage Collector: “Apple has released AutoZone, the Objective-C garbage collector, as open source under the Apache license. ‘★’ [...]

  11. Papa Joe says:

    i didn’t know Apple was in the auto parts business too.

  12. Russell Finn’s Weblog » Blog Archive » OCPython, anyone? says:

    [...] towards 2.5 because it’s the version shipped with Leopard, but now I’m persuaded by Bill Bumgarner’s comment to use 3.0 and take advantage of the revised, less crufty implementation. (This is based on the [...]

  13. Pages tagged "objective" says:

    [...] bookmarks tagged objective bbum’s weblog-o-mat » Blog Archive » AutoZone:… saved by 5 others     ROLLINONBY bookmarked on 12/07/08 | [...]

  14. Mac Developer Network » Blog Archive » » LNC Episode 036: Garbage Collection says:

    [...] very happy to see that the source code for libauto was released recently. Bill Bumgarner wrote an announcement about it on his [...]

  15. Patrick says:

    The tarball is here.
    That is all.

  16. Levi Earnshaw says:

    It’s interesting that a garbage collector for Apple’s language is written using C++ instead of their own C+. Well I guess it’s probably because it’s more dynamic and less optimal.

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>