This might sound silly, but is there a way to induce a memory leak through tcl scripts?
my eggdrop continually consumes memory... and after a good period of time it'll render my machine useless w/o a reboot. i'm just wondering if this could be a problem with my bad scripting habits. thx.
Yes, I have seen this happen with heavy use of arrays in Tcl, especially when the data in the array is shared data (also in a list or separate variables). It seems like a bug in Tcl, as everything in the script was fine.
Of course it never froze my computer. You must be on windows hehe.
Are you sure it's Tcl? Is it reproducable when Tcl scripts are removed? Can you pin-point it down to one scripts?
Could it be eggdrop? While Tcl could be a legitimate source of the problem, it may well be that eggdrop is infact causing the mem-leak. Have you been able to prove this wrong?
i'm not sure its TCL, but i am sure its the eggdrop. and i assume its my scripts because i keep my modules and scripts (other than mine) to a minimum... but i do have quite a few scripts of my own. which leads me to think its something that i'm doing. thats why i was wondering if there were any scripting bits that i should know of in trying to prevent my leak.
but yea it could be something else entirely although i wouldn't know what.
if i were to pinpoint the script how would i go about that? would i just remove it from my conf file and wait a couple days? or is there something a little more to the point?
Though you would have to kill the bot, to make sure that any components of the script being unloaded are banished from memory.
My advice, is to pick on any scripts that involve in reading data from files, or via a HTTP request (web-download).
These are a primary cause of memory-leaks. They occur when data downloaded, data has been read or when a socket/file isn't closed/cleaned up. Memory will continue to be used untill it is freed.