[gecode-users] Memory problem

Guido Tack tack at ps.uni-sb.de
Thu Aug 28 13:06:08 CEST 2008


Gustavo Gutierrez wrote:
> On Thu, Aug 28, 2008 at 9:20 AM, Guido Tack <tack at ps.uni-sb.de> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080828/f7f0196b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080828/f7f0196b/attachment.bin>


More information about the gecode-users mailing list