freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Status


From: Scott Haney
Subject: Status
Date: Fri, 27 Apr 2001 17:53:07 -0600

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]