Patching up the heap