What do people mean when they say a game has a "memory leak"?
For anyone not familiar with the term, a memory leak is when a computer program stops using a piece of data it is holding in RAM without making that RAM available for reuse.

Sometimes it's intentional. For example, Alien Swarm: Reactive Drop clears its list of inventory item definitions without deleting those definitions if the inventory schema changes while the game is open.

The idea is that it's better to waste a few kilobytes of memory on something that might happen once a month at most (until the game closes and the operating system reclaims all of its memory) than to spend developer time, memory, and processor cycles making sure that everything that uses item definitions can handle the item definitions changing underneath it during processing.

Most of the time it's unintentional, as a result of forgetting to call free() or delete in a language with manual memory management, or unintentionally keeping a pointer to some data structure in a garbage-collected language.

A memory leak can cause performance problems, but only if the computer has completely run out of RAM and is "swapping" or "paging" memory data to disk to try to make more space. If you've ever had your computer run really slowly at 99% memory usage, that's why.




But that's not what people who complain about games having memory leaks are talking about. So what are they talking about?

The most recent instance of this I saw was someone saying that they couldn't play a game's demo for more than 30 seconds because it had "memory leaks". Is that just what people call any kind of performance problem?
< >
Showing 1-6 of 6 comments
Thanks
Firefox had a memory leak, so if you were using it at first it might use 500MB of RAM. 2 hours later it might be up to 2GB of RAM. Then 4GB. Then 8GB. Etc.

A memory leak is when a program doesn't release RAM, but it keeps taking more. Eventually, you use up so much RAM (or vRAM) than your system slows to a crawl, bugs out, or crashes.

So if they can't play a game due to a memory leak, it is because their vRAM is filling up, then crashing the game when the game can't access free vRAM to function.
Last edited by D. Flame; Mar 8 @ 8:21am
Originally posted by Ben Lubar:
The most recent instance of this I saw was someone saying that they couldn't play a game's demo for more than 30 seconds because it had "memory leaks". Is that just what people call any kind of performance problem?
It's the same as how the word hacked has just become a catch all term when something happens on a phone or computer that someone doesn't like.
Originally posted by D. Flame:
Firefox had a memory leak, so if you were using it at first it might use 500MB of RAM. 2 hours later it might be up to 2GB of RAM. Then 4GB. Then 8GB. Etc.

A memory leak is when a program doesn't release RAM, but it keeps taking more. Eventually, you use up so much RAM (or vRAM) than your system slows to a crawl, bugs out, or crashes.

So if they can't play a game due to a memory leak, it is because their vRAM is filling up, then crashing the game when the game can't access free vRAM to function.
More RAM use can easily happen on a per-tab basis when visiting specific websites. Usually seen for things like youtube which is horrifically unoptimized and too much trash working in the background that starts using CPU as well even if "parked". Always pay attention to what tab is consuming memory and how much memory that is.

Originally posted by Ben Lubar:
The most recent instance of this I saw was someone saying that they couldn't play a game's demo for more than 30 seconds because it had "memory leaks". Is that just what people call any kind of performance problem?
Usually that's a case of "so do you have 4GB or 8GB installed?" and "how much memory out of your total is in use before you launched it?"

Typically it's just people thinking 4GB/8GB will do perfectly with... everything.
Originally posted by Mad Scientist:
Originally posted by D. Flame:
Firefox had a memory leak, so if you were using it at first it might use 500MB of RAM. 2 hours later it might be up to 2GB of RAM. Then 4GB. Then 8GB. Etc.

A memory leak is when a program doesn't release RAM, but it keeps taking more. Eventually, you use up so much RAM (or vRAM) than your system slows to a crawl, bugs out, or crashes.

So if they can't play a game due to a memory leak, it is because their vRAM is filling up, then crashing the game when the game can't access free vRAM to function.
More RAM use can easily happen on a per-tab basis when visiting specific websites. Usually seen for things like youtube which is horrifically unoptimized and too much trash working in the background that starts using CPU as well even if "parked". Always pay attention to what tab is consuming memory and how much memory that is.

Originally posted by Ben Lubar:
The most recent instance of this I saw was someone saying that they couldn't play a game's demo for more than 30 seconds because it had "memory leaks". Is that just what people call any kind of performance problem?
Usually that's a case of "so do you have 4GB or 8GB installed?" and "how much memory out of your total is in use before you launched it?"

Typically it's just people thinking 4GB/8GB will do perfectly with... everything.
The issue is not that tabs consume RAM to get stuff done. The issue is that they do not release it when finished, and the problem compounds on itself.
Kargor Mar 8 @ 9:14am 
Originally posted by Ben Lubar:
The most recent instance of this I saw was someone saying that they couldn't play a game's demo for more than 30 seconds because it had "memory leaks". Is that just what people call any kind of performance problem?

That's precisely what people do: they have no way of knowing anything, so they just use technical terms they have picked up at some point, like "memory leak" or "badly optimized".
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Mar 8 @ 8:03am
Posts: 6