Memory Usage BUG???
Posted: Sun Jul 24, 2005 6:52 pm
I run the HouseBot server with lots of vbs scipts. Some of them are very large, but also very basic without any use of object etc. I noticed that if such a script has a Function call, memory is used for that and it is not given back to the system when the script gets the state Stopped. This could have something to do with the stack, or garbadge collection. I do not have a recursive problem where certain Functions keep calling themselves and end up in a stack eating loop! I am not even sure if this is HouseBot related or Windows, but this memory leak gets my system down in a few days if I use these scripts often.
One very large script that controls the serial port of my receiver uses about 100 KB every time it gets the state Running. This script runs if the Received Data property Not Equals "_". In other words, if I turn up the volume on my receiver slowly, this script runs about the same amount of times as my volume is increased and therefore uses xx times 100KB of memory.
As a workaround, I could kill HouseBot every other midnight and have it restarted to clear this memory, but I don't think this is the way to go. Or I could rewrite my scripts to not use any Functions, Subs or Calls, but that would also be stupid.
If somebody else uses large vbs scripts with Function .... End Function calls, please open the task manager and have a look to what it does to your memory usage and let me know.
I cannot test this from Windows, because I don't know which task I should monitor to see if I loose memory.
One very large script that controls the serial port of my receiver uses about 100 KB every time it gets the state Running. This script runs if the Received Data property Not Equals "_". In other words, if I turn up the volume on my receiver slowly, this script runs about the same amount of times as my volume is increased and therefore uses xx times 100KB of memory.
As a workaround, I could kill HouseBot every other midnight and have it restarted to clear this memory, but I don't think this is the way to go. Or I could rewrite my scripts to not use any Functions, Subs or Calls, but that would also be stupid.
If somebody else uses large vbs scripts with Function .... End Function calls, please open the task manager and have a look to what it does to your memory usage and let me know.
I cannot test this from Windows, because I don't know which task I should monitor to see if I loose memory.