[gecode-users] Memory consumption - element constraint
benoit
benoitlaurent at neuf.fr
Mon Nov 2 22:25:31 CET 2009
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
More information about the gecode-users
mailing list