[gecode-users] Tracking memory usage

Malcolm Ryan malcolmr at cse.unsw.edu.au
Mon May 11 06:01:08 CEST 2009


Is it possible to find out how many variables are in a particular  
space? Or how many active propagators?

Malcolm

On 07/05/2009, at 9:35 PM, Guido Tack wrote:

> 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