swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Re: [Swarm-Modelling] xmalloc problem


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] Re: [Swarm-Modelling] xmalloc problem
Date: Sat, 26 Jun 2004 09:57:38 -0600
User-agent: Mozilla Thunderbird 0.7 (Windows/20040616)

Steve Railsback wrote:

If you are running under Cygwin in Windows, we found a help page that shows how to increase the system's limit on how much memory Cygwin can allocate. It seems likely that this would solve the xmalloc error, if it occurs when you have not yet used up ALL your system's memory. We haven't tested this trick yet.

The xmalloc things means you are either using or leaking memory like crazy. Increasing the amount of memory may delay the crash (perhaps enough), but keep in mind that the more you allocate past your physical RAM, the more will be hitting disk and slowing everything down.

You can either track the memory allocates by putting a break point in the debugger on xmalloc, or use the Zone diagnostics to figure out what kind of objects are live and numerous. These things have been asked and answered many times in the mailing list archives.

Usually the only way to use breakpoints for xmalloc effecitively is to make the conditions under which there are active delayed or conditional. For example, run the model for a while (until you think it is likely the memory consumption is welll underway), and then interrupt the debugger or stop by way of break point carefully-chosen point in the code. To make it easier/faster, you can even modify your code to have special lines that only execute and thus are easy to trap with the debugger (gdb). Once trapped, begin monitoring memory allocations and look for obvious regularities in the origin in the backtraces.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]