Take reference data into account in memory usage tracking am: d923e3ef94