Hi, finally I found the bug: in the copy constructor of my propagator, I called SharedArray(int n) constructor, that allocated each time new memory. I did it only in the version inherited from NaryPropagator class, which is the reason why the other version was OK.
Cheers, Jan Jan Kelbel wrote: > Hello, > > some months ago I implemented N-ary propagator (it is that edge-finder). > When I used it to solve larger problem instances, I noticed that it > consumes memory in rate of about 1MB/s. > I tested it in Gecode 2.2.0 (where it was even about 3MB/s) and in > Gecode 3.1.0., using MS Visual C++ 2008. > > This propagator is inherited from class NaryPropagator. In the propagate > method, there is an array for sorting, which is created using the Region > allocation. > > When I changed the edge-finder to inherit directly from the class > Propagator, the growing memory consumption disappeared. > > My question is, are there some rules, what should be implemented in > propagator inherited from NaryPropagator in order allocate/dealocate > memory correctly? > > Thank you. > > Regards, Jan _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users