public void RecordAlloc(int c, int b) { for (AllocNode n = this; n != null; n = n.Parent) { n.n_allocs += c; n.n_bytes += b; } }