Advertisement

Run check-ups and reboot to fix memory leaks

Reading Time:2 minutes
Why you can trust SCMP
0

I have had several different computers over the years, mainly Windows and pre-OS X Macintosh. After a while, all of these machines began behaving strangely. They would slow down, crash,and perform sluggishly. A friend said I should switch to a new Mac running OS X or even Linux because they are based on Unix, which means they are much better. My friend says all Unix machines run a special program at 3am to 'fix' things. This sounds a bit odd. Is it true?

Name and address supplied

For most people, the ups and downs of PCs have been a part of dealing with this new technology. Those of us who have been at it a little longer have acquired a built-in twitch on our left hand: we instinctively hit Control-S (or Command-S on Mac) to save what we are doing.

This 'digital reaction' comes from more than 20 years of experience with computers that inexplicably crash or stop working. We have lived through the era of the 'blue-screen-of-death' (a Microsoft favourite) or the 'eternal spinning beach ball' (a Mac favourite) or watching the mouse suddenly freeze.

The reason for this was mainly what we call 'memory leaks'. When computers run software, they must set aside memory to handle data. This is called allocating memory. It is important, however, that when the computer no longer needs that data it gets the memory back. Until recently, the responsibility for this rested squarely on the programmers' shoulders.

When we run a word-processor or go on the internet with a browser, the software tends to run in loops. It waits to see if we do something with the keyboard or the mouse, performs that action and then waits for the next thing we do. It is an endless cycle of waiting, acting, and waiting again until you exit. If there is only a tiny amount of memory not being 'given back', this cycle will eventually eat up all memory and the machine will crash.

Both Microsoft's XP and Apple's OS X have gone a long way to fixing this kind of problem, but neither can do so automatically.

Advertisement
Select Voice
Choose your listening speed
Get through articles 2-3x faster
1.1x
220 WPM
Slow
Normal
Fast
1.1x