///////////////////////////////////////////////////// public void AddAllocatedOnly(ObjectStats other) { this.AllocatedCount += other.AllocatedCount; this.AllocatedTotalBytes += other.AllocatedTotalBytes; this.AllocatedTotalAge += other.AllocatedTotalAge; this.AllocatedTotalWeight += other.AllocatedTotalWeight; }
static public ObjectStats operator -(ObjectStats a, ObjectStats b) { ObjectStats c = new ObjectStats(); c.AllocatedCount = a.AllocatedCount - b.AllocatedCount; c.AllocatedTotalBytes = a.AllocatedTotalBytes - b.AllocatedTotalBytes; c.AllocatedTotalAge = a.AllocatedTotalAge - b.AllocatedTotalAge; c.AllocatedTotalWeight = a.AllocatedTotalWeight - b.AllocatedTotalWeight; c.LiveCount = a.LiveCount - b.LiveCount; c.LiveTotalBytes = a.LiveTotalBytes - b.LiveTotalBytes; c.LiveTotalAge = a.LiveTotalAge - b.LiveTotalAge; c.LiveTotalWeight = a.LiveTotalWeight - b.LiveTotalWeight; return(c); }