Hello all, I have implemented a GCC plugin that instruments code to implement reference counted memory management instead of manually adding calls to inc()/dec() reference counts. It is a work in progress. Any ideas/suggestions are welcome.
Code is at https://github.com/acbits/reftrack-plugin Here is a sample. typedef struct S S; S *p = ... , *q = ...; p = q; is transformed into typedef struct S S; S *p = ... , *q = ...; S_addref(q); S_removeref(p); p = q; Regards Aravind