Faster Virtual Method Dispatch
Craig Black
cblack at ara.com
Wed Apr 26 20:47:34 PDT 2006
Good idea! I suppose that every time you allocate memory you must always
specify a parent node in the hierarchy. This requires a little more thought
than GC, because you have to consider how to organize the hierarchy so that
it will be easy to free memory relating to a given task once the task is
done. Such a system is would be very fast, and with just a small amount of
preparation, memory leaks are completely eliminated. It could potentially
be faster than traditional memory management, because you don't necessarily
have to call free on every block of memory. Rather, one free could free the
entire hierarchy, or a large sub-hierarchy. Have you experienced any
drawbacks? Does this approach work well with exceptions? threads? Also,
what kind of data structure do you use for this hierarchy?
-Craig
More information about the Digitalmars-d
mailing list