Added memory measurements.