Hi,
I was thinking about a similar approach some time ago. But that means that
you _must not_ have static variables that you rely on being initialised
correctly.
I mean, we have xmalloc(), and it would be easy to enforce xfree(), too
(which would be good for memory profiling anyway), and we _could_ hack
that into tracking which pointers were returned after which checkpoint.
But we _cannot_ say which static variables should be initialised (and
how), after some "exception" was thrown at a certain point.
Ciao,
Dscho
-