(filename, root, allocs, dedup)
| 345 | |
| 346 | |
| 347 | def write_diff(filename, root, allocs, dedup): |
| 348 | out_filename = filename + ('.allocs' if allocs else '.frees') |
| 349 | print('Creating', out_filename) |
| 350 | |
| 351 | root = Node(copy=root) |
| 352 | root.diff(allocs, dedup) |
| 353 | with open(out_filename, 'w') as out_file: |
| 354 | root.print(out_file) |
| 355 | |
| 356 | del root |
| 357 | |
| 358 | return out_filename |
| 359 | |
| 360 | |
| 361 | if __name__ == '__main__': |