New to the world of Memory Leaks
Greetings!
In a prior life, on another planet .... errrrrr... I mean platform, we never even had the phase "Memory Leak".
Now I find myself in the Microsoft realm and have had my first nasty encounter with memory leaks and someone
not cleaning up their garbage.
Recently I installed some new EDI software. Once in a while, it would fail upon initiation. When I called the vendor and told them about the error that I was receiving, they told me to simply re-boot
to fix the problem. It did so and the re-boot did indeed fix the problem. The vendor also said that the error that I was seeing was the result of other programs not freeing up memory when they close.
Here is the software that is used on this PC. Word, Excel, Access, Outlook Autohotkey, and the new EDI software.
Again, I am new to the problem of memory leaks. I am not sure where to start looking.
Dumb question - I know that AHK can do some pretty cool stuff. Is it possible to use AHK to look at a PC's
memory and determine if another program is now playing nicely?
Is it possible to have a memory leak in AHK? If so, how can this be avoided?
Thanks,
Costas
Planet Tralfamadore
the latest process explorer is nice (and free) and you can download it from http://technet.micro...ernals/bb896653
I use it a lot when i need to check on what my system is doing or dump non-critical apps to free up memory space.
The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter KeyLooperDemo Key Spammer TinyClickRecorder GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
You may have to customize the columns to get anything useful.
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run
Thanks for the help, I appreciate it.
This is probably a really dumb question and I am not sure even how to phrase it.
Are all chunks of memory that are not "freed up" tied to processes that I can see in the Task Manager?
In other words, is memory only tied up if there is a process that is somehow holding it?
I have heard the term garbage collection. Is this then simply killing off tasks? For some odd reason, I had this idea that memory can somehow be not freed up even it is not tied to a process that is running.
Thanks,
Costas
How does the OS deal with memory internally? Not a clue.
You can do some Google/wikipedia searches if you're still curious.
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run
When memory is tied to a running program or process that memory is normally visible in the process explorer window. Processes mainly are required to clean up their own memory allocations when they no longer need them. The operating system generally has a memory manager that can handle that and the process simply needs to call the API for that to free the memory and flag it as available for use. Over time memory blocks can, just like hard drive blocks, become fragmented and "chunked" over the entire memory space. This is another function of garbage collection as well -- gathering up all the loose change of memory and trying to construct a solid block of memory for other programs to use. To do that oft-times the garbage collector will have to suspend running programs and processes and reallocate their memory blocks sort of like a hard disk defragmenter. To the extent that the garbage is spread out through the entire memory space, the machine may slow down, lag, and even seem to freeze up for periods of time while garbage collection is in progress. This is particularly noticeable in older (pre multi core) machines.
The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter KeyLooperDemo Key Spammer TinyClickRecorder GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
Thanks for the nice explanation of memory management, I appreciate it.
Of the applications that run on the PC with the occasional problems, I would guess that Access is the culprit rather than Word, Outlook, or Excel.
I say this because the Access applications have custom built VBA code.
Thanks again,
Costas
PS. I sometimes long for Planet Tralfamadore where memory management was of no concern for application developers.
(Parody) Heard eminating from Bill Gates' office, "Verily, I shall make The World my alpha site and it will rejoice."
The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter KeyLooperDemo Key Spammer TinyClickRecorder GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.