No that's unlikely to be the reason: 1240 element constraints with 600 elements each is nothing (that should be less than 2-3MEG of mem). How much memory do you need?
Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: benoit [mailto:benoitlaur...@neuf.fr] Sent: Monday, November 02, 2009 10:26 PM To: Christian Schulte Cc: us...@gecode.org Subject: Re: [gecode-users] Memory consumption - element constraint Christian Schulte a écrit : > Oh, there is another quirk too watch out and that is on my todo list: > Suppose you post many, many element constraints each of which uses exactly > the same integer array. Then for each element constraint posted a new array > is created (not for each copied, but for each posted). This is exactly my case. > What is in principle > possible is to first create something that is called a SharedArray (which is > not yet exposed on the modeling layer but is used inside the implementation > of element) and post the element constraint with this shared array instead. > Then the array will exist only once in memory. > > However, this you can only see if you post several thousands of element > constraints. > I post two element constraints for each node of the graph (total : 620). To be precise, I do not observe an overflow but only a high memory usage. I was a bit worried because I wished to add similar constraints. > Anyway, shared arrays will be exposed on the modeling layer in 3.2.1 which > will be available shortly. > For the moment, I can circumvent the problem. I will wait for the new release. Regards, Benoît _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users