swarm-support
[Top][All Lists]
Advanced

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

Re: Memory Zones...


From: Rick Riolo
Subject: Re: Memory Zones...
Date: Mon, 20 Apr 1998 07:59:29 -0400 (EDT)

Usually the size of the executable does not depend
on the number of agents you are running with.
(Unless you define some static sized arrays to store them, I suppose.)
The agent objects are usually created at run time, e.g.,
look at how heatbugs does it, so that the memory used
to store them is allocated at run time (and thus is not
in the executable).

Presumably what is happening is that when you run the program,
its trying to create more objects than can fit in your
computer's available memory.
I would guess you have some loop that's getting away
from you when your N >= 52.   Check your end-loop tests,
e.g., in while's or for's, to be sure they stop.
Or put in 
   fprintf(stderr,"Created agent number %d...\n", n );
in the loop where you create agents (where n is counting
the number created so far).

 - r

ps I suppose if your agents each use a huge amount of space
   (eg they have instance variables that are large static arrays)
   then you could actually be running out of memory when
   it tries to create the 52nd agent.
 
Rick Riolo                           address@hidden
Program for Study of Complex Systems (PSCS)
4068 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 313 763 3323                  Fax: 313 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html

On Mon, 20 Apr 1998, Mike Roth wrote:

> Date: Mon, 20 Apr 1998 00:01:33 -0400 (EDT)
> From: Mike Roth <address@hidden>
> To: The Hive <address@hidden>
> Subject: Memory Zones...
> 
> I was hoping that someone may be able to help me with this.
> 
> I'm currently implemening a populations of agents however, whenever I try
> to create 52 or more agents, the program goes from using 1.4M of memory to
> 23M of memory after which it quits and says that it cannot claim any more
> memory.  The only problem I have is that when I intialize 51 agents the
> executable is only 1.4/1.5M large and I don't get this problem.  Is there
> any way I can get about this limit?
> 
> Thanks
> 
> -----
> "Specialization is for insects"
>                       - Robert A. Heinlein
> 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================
> 

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

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