Added heap memory accounting and output to ddSim.