Add chapter 16 code - memory management.