Well, not so sure. There could be another workaround: look to the file gecode/kernel/memory-mananger.icc. There you will find something like:
/** * \brief Parameters defining memory management policy for spaces * \ingroup FuncMemSpace */ namespace Config { /** * \brief Minimal size of a heap chunk requested from the OS */ const size_t hcsz_min = 2 * 1024; If you increase hcsz_min to 16 * 1024 that would avoid part of the problem. One part are the spaces which are very small and few. But per space you will typically allocate a number of heap chunks. Initially these chunks will be small and will only dynamically grow when demand justifies it. So, if you increase, you'll have more slack but more blocks will be returned to the OS. Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ From: Guido Tack [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 1:06 PM To: Gustavo Gutierrez Cc: [EMAIL PROTECTED]; Christian Schulte Subject: Re: [gecode-users] Memory problem Gustavo Gutierrez wrote: On Thu, Aug 28, 2008 at 9:20 AM, Guido Tack <[EMAIL PROTECTED]> wrote: I tried to find out more about the Mac OS malloc. Apparently, Mac OS never frees blocks that are smaller than 15359 bytes, but rather tries to reuse them for further mallocs in the same process. http://kevin.sb.org/2007/07/05/malloc-free-space-not-reclaimed/ I tried replacing malloc with ptmalloc3 (as suggested in that article), and it completely solves the problem. Now I am wondering if the same problem can occur when using gecode in the *normal* way, i mean, with gecode search engines as in the examples. Any comment? That's unlikely. The problem is that the memory footprint is going to be the maximum memory used by spaces that are alive at the same time. In your example, that's tens of thousands of spaces. During search, it's never more than a few spaces (search tree depth / recomputation depth). If the tree depth is very big, you're lost anyway as the search is not going to find a solution. Cheers, Guido
_______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users