[gecode-users] Tracking memory usage
Guido Tack
tack at ps.uni-sb.de
Thu May 7 13:35:14 CEST 2009
Malcolm Ryan wrote:
> I am applying two different (custom) branchings to the same constraint
> problem and one of them is reporting a lot more memory use (via
> Statistics) than the other. This is not completely unexpected but the
> difference is big enough that it requires more careful analysis to
> make sure it isn't just the result of an implementation flaw.
>
> Is there any way you can recommend to track memory usage in a more
> fine-grained fashion?
If you want to look at individual nodes in the search tree, you could
use Gist with a print function like this:
virtual void
print(std::ostream& os) const {
os << "allocated: " << sizeof(*this)+allocated() << std::endl;
}
Cheers,
Guido
More information about the gecode-users
mailing list