Memory Leaking

Unexpected Flaw Crashing Applications Seemingly Randomly

Steve Smith, talks about how a specific type of programming flaw, a memory leak, can cause applications to crash seemingly randomly, and unexpectedly.

Episode #5-48 released on August 17, 2015

Watch on Youtube

In a world full of computers, tablets, cellphones, servers, game consoles, smart devices, etc... things crash and sometimes needed to be rebooted, and while there are plenty of reasons for this, today, I will be talking about one very special runaway problem that affects all platforms, and devices, the infamous memory leak.

Let us explain a little about how computers work. Your computer, or device, has ram. Each application manages an amount of allocated memory, which is meant for the program. While the program is running, it is supposed to use that memory effectively, and when the application is terminated, have that same allocated memory returned to the system's available pool of memory. Achieving this, we know the program has been programmed correctly.

Now, in a perfect world, every programmer is instructed correctly and has coded his or her program correctly to manage and release memory effectively. However, businesses and individuals are more concerned in being first and not best, so perfectly managed programs tend to be rare without patches later on.

However, this problem is not limited to the application you're running, the operating system, application plugins, drivers, etc... can, also, lead to a memory leak. So, regardless of what programmer, a memory leak related to your device and application you are running, can cause issues that you may or may not notice.

And, that is the thing, many memory leaks may not be noticed. Very few operating systems don't automatically return allocated memory to the free memory pool once the application is turned off. Some applications are light enough, and some devices have sufficient memory, that the memory leak remains unnoticed. So, why is memory leaks an issue, and who notices this?

Memory leaks are an issue, because some of them are for heavier programs that are meant to run longer, like video editing applications, and memory leaks can cause the application to stall or crash unexpectedly. It is an issue because memory leaks, unlike badly executed commands for specific functions, cannot be avoided, and therefore we cannot be sure when the application will crash. Some instances can even occur while you attempt to save the project itself.

Is there a way to explain this for anyone to understand this easily? Yes. Let's say you have a pool that can support 1000 gallons of water. And, you are entitled to fill it with a hose that can pump in 100 gallons per minute. Normally, you would expect to be able to empty 100 or more gallons from the pool or it will flood. For ram, this does occur in memory leaks, as it ends up accessing more ram than it was allocated, and once all the system ram has been completely saturated by the the application, computer, or device, it will either stall, crash, or halt the program responsible. This usually means all the work is potentially lost.

Is there a way to fix this issue ourselves? Only if you are the one making the application. It is preferable that you notify the application developer of the crash, what your system configuration is, what plugins you have installed, and any updates you have done to the application, and operating system. Indicating system specifications is, also, important. And, more importantly, install all the latest updates that come with your operating systems, devices, firmware, bios, software, plugins, etc... to get the most out of fixes for your system. If you are the type to avoid installing updates to applications, you will never see memory leaks themselves solved. And whilst, it is possible for future patches to cause memory leaks, updates, also, fix memory leaks by addressing many issues under the developer's control.

Host : Steve Smith | Music : Jonny Lee Hart | Editor : Steve Smith | Producer : Zed Axis Productions

Sources & Resources

Community Comments

Share your thoughts, opinions and suggestions

Login or Register to post Your comment.