More reference counting?
After fixing the program as I mentioned in the last post, it worked fine (not immediately, had a couple of bugs to quash).
Yet from about 500,000 memory allocation I still had about 30 memory leaks. Why?
After working on this problem all yesterday and today, I realized that it had to do with the acutal user objects that are being referenced. This is too complicated to explain here but in certain cases, when a thread manages to advance a bit more than I'd anticipated, it would not delete an object it should delete (no way for it to know that it should).
To make a long story short, it seems that the only way around this problem is to use a reference counter for the objects. This way I would in effect be having a reference counter for every datastructure used in DSTM. Moreover, I believe that there are still a couple of memory leaks that I still have unaccounted for.
I am having a hard-time getting the garbage collector to work. Will continue working on that now.
I am not happy :(
Yet from about 500,000 memory allocation I still had about 30 memory leaks. Why?
After working on this problem all yesterday and today, I realized that it had to do with the acutal user objects that are being referenced. This is too complicated to explain here but in certain cases, when a thread manages to advance a bit more than I'd anticipated, it would not delete an object it should delete (no way for it to know that it should).
To make a long story short, it seems that the only way around this problem is to use a reference counter for the objects. This way I would in effect be having a reference counter for every datastructure used in DSTM. Moreover, I believe that there are still a couple of memory leaks that I still have unaccounted for.
I am having a hard-time getting the garbage collector to work. Will continue working on that now.
I am not happy :(
0 Comments:
Post a Comment
<< Home