Exercises
Add pool growing to nodepool.m.
Profile nodepool with Shark or Instruments. What’s the major bottleneck for -allocNode? What causes it? How would you fix it?
Find all the errors in Example 7.11, some of which are memory related. (I found nine.)
Example 7.11. memerror.m
// memerror.m -- try to find (and fix!) all the memory-related errors in // this program // Take a string from the command line. Make a linked-list out of it in // reverse order. Traverse it to construct a string in reverse. ...
Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.