|
From: | Fred Wan |
Subject: | Memory exhaustion |
Date: | Thu, 20 Dec 2001 17:43:33 +0100 |
Hi, I'm encountering a problem which may not have to do with swarm directly but which I find worrying all the same. Maybe someone has encountered the same problem and/or can give me some advice. In the program I include, a number of agents (TargetBugs) are put in a grid (Grid2dImpl) and a list. The agents are removed at each step when they move across the grid according to some probability. After a number of steps (50), ModelSwarm creates new ones and this process continues indefinitely. The size of the virtual machine (jdk) almost always grows continuously, indicating memory exhaustion. With some VMs (Kaffe under NT4 and the Visual Cafe's VM) this does _not_ happen and memory is returned to the system. Because swarm uses its own way of memory allocation, java's finalize() method can't be used to check what happens. I'm wondering if and how can be checked whether memory is being held somewhere where it shouldn't, or if it is just this is due to different garbage collection procedures of the VMs. It is also troublesome that when increasingly large amounts of memory are claimed by the VM, the whole execution slows down (and less importantly, so do the rest of the tasks on the system). Thanks, Fred Wan, Vrije Universiteit Amsterdam, The Netherlands.
SimpleBug.scm
Description: application/icq-scm
TargetBug.java
Description: Binary data
StartSimpleBug.java
Description: Binary data
ObserverSwarm.java
Description: Binary data
ModelSwarm.java
Description: Binary data
FoodSpace.java
Description: Binary data
Agent.java
Description: Binary data
Makefile
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |