summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5b9125d)
Even when free() can be called with a null pointer, the extra call might
be significant. On hard GC benchmarks making the test for null in the GC
code (i.e. avoiding the free() call) can reduce the GC time by almost ~5%.
+ // Even when free() can be called with a null pointer, the extra call
+ // might be significant. On hard GC benchmarks making the test for null
+ // here (i.e. not making the call) can reduce the GC time by almost
+ // ~5%.
if (data)
{
cstdlib.free(data);
if (data)
{
cstdlib.free(data);
pool.Dtor();
cstdlib.free(pool);
}
pool.Dtor();
cstdlib.free(pool);
}
+
+ // Even when free() can be called with a null pointer, the extra call
+ // might be significant. On hard GC benchmarks making the test for null
+ // here (i.e. not making the call) can reduce the GC time by almost
+ // ~5%.
if (pooltable)
cstdlib.free(pooltable);
if (pooltable)
cstdlib.free(pooltable);
if (roots)
cstdlib.free(roots);
if (roots)
cstdlib.free(roots);
if (ranges)
cstdlib.free(ranges);
}
if (ranges)
cstdlib.free(ranges);
}
baseAddr = null;
topAddr = null;
}
baseAddr = null;
topAddr = null;
}
+ // See Gcx.Dtor() for the rationale of the null check.
if (pagetable)
cstdlib.free(pagetable);
if (pagetable)
cstdlib.free(pagetable);