Thomas Joad wrote:
> I tried your suggestion, but it doesn't seem to solve the problem
> completely. I see, now, that GC happens every increment of 100MB or
> so. At that point, it retreats, but soon memory usage climbs back up
> beyond its previous level, retreating again, and climbing even higher.
>
> My new version I'm using discards the spaces and explicitly calls
> the collector:
>
> fun one_attempt () =
> let val (a, b) = Search.searchAll (queens 11) in
> List.map (fn space => Space.discard space) a;
> Store.collect 50 end;
>
> Are there any other options for keeping memory in check?
I don't think so.
> My goal is to use Alice in a production environment for my company,
> running as a constraint-solving server behind a Web server. I fear
> that its memory appetite will make the service unreliable.
I'd consider implementing the constraint solving part directly in C+
+. For Gecode, we're very careful with memory management, and its
memory appetite is very reasonable. As soon as you have a thick layer
like Alice (or Java) in between, things get much more complicated.
Cheers,
Guido
_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users