Re: Memory leak (Jim Rudnicki)

"Hong Wong" <[email protected]> Wed, 26 May 2004 14:13:47 -0400
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hello Tom and Jim,

I also have had problems with the memory leaks, mainly because I am
performing socket communications (which are known to have memory leaks when
leaving socket communication open).  My application was to monitor and
control a DC motor via the internet.  You guys can try the experiment at:
http://mechatronics.poly.edu/TINIPaper/

Now for my solution for memory leaks.  I perform a system garbage collect at
subsequent iterations of my main program (i.e., System.gc() command is
used).  It does solve my problem with memory leaks however, this manual
garbage collection scheme is quite dangerous since it wipes out large
amounts of memory used by the program (even the variables/objects you don't
want to erase).  Prior to using System.gc, I have tried to null all unused
objects from my program.  However, this did not plug the leak (so to speak).
Hopefully this technique may help solve your problem, Tom (or may make you
more frustrated, depending of the results).  

Thanks for listening

Hong


---------------- Previous Message --------------------
Tom,

I can only offer hope.  This is from my TINI that monitors temperature
sensors on the 1-Wire about every 15 seconds and updates my database:

TINI OS 1.02c

System up time:
      Days: 23
     Hours: 21
   Minutes: 5
   Seconds: 9

Free RAM: 145344

The memory bounces up to a few hundred k and down to under 100 every few
minutes, but it has never crashed.

Jim

----- Original Message -----
From: "Tom Watson" <[email protected]>
To: "tinilist" <tini-6tN4nzCoH/[email protected]>
Sent: Monday, May 24, 2004 3:36 PM
Subject: [TINI]Memory leak


> We just deployed a new version of our application into the pilot sites and
> it has developed a new problem. The application uses 1-Wire extensively
and
> starts with about 300K of free RAM. After about two days, the average free
> memory has declined to <64K and one of the threads quits, forcing the
> watchdog to restart the system. On the good side, it comes back up and
> operates normally. On the bad side, this cycle repeats every two days.



_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini