Status

Scott Haney scotth at proximation.com
Fri Apr 27 23:53:07 UTC 2001


I worked on fixing two bugs that were giving the Blanca team trouble:

(1) There was a pretty serious memory leak that occurred when Updaters 
were added to Fields (well, maybe "pretty" is a little bit of an 
understatement - between 30 and 50% of all bytes allocated to Fields 
were being leaked :-). Updaters are used to enforce boundary conditions 
or support Blanca'a relations. They are supposed to be automatically run 
prior to evaluation if a "dirty" flag is set. One of the big advances in 
POOMA 2 is that standard, data-parallel notation can be used to write 
updaters. This presents a minor problem in that an updater targeting a 
Field operates on a mostly shallow copy of that Field. I say "mostly" 
because one needs to make sure that an operation on the Field stored in 
an Updater doesn't end up causing that Updater to be subsequently 
invoked. This causes infinite recursion. The solution is to strip 
Updaters for the Field stored in an updater. We weren't doing this 
correctly and this ultimately caused the memory leak. To make a copy of 
a Field without Updaters is:

Field_t f(...);
f.addUpdaters(...);
Field_t g(f, Pooma::DontCopyUpdaters());

This was a tough one without good memory diagnostic tools. Stephen 
ultimately figured out the problem, which was quite subtle.

(2) We forgot to make sure that Updaters were run before a Field was 
reduced (e.g., in sum, etc).

I checked in changes for both of these problems. They were reviewed by 
John Hall.

I also checked in a CodeWarrior fix for the out-of-line constructors in 
Interval.h, etc. I never heard definitively on what the correct syntax 
was, so I opted for a solution that looks like it will compile 
everywhere.

Scott



More information about the pooma-dev mailing list