Google Chrome Memory Leak Fix

Fri, Jul 2, 2010, by I Am No One


How to fix severe memory leakage in Google Chrome.

Sometimes, when I really get into things, I couldn’t stop until I find a solution. In a preivious article, I pointed out Google Chrome’s possibilities about being the fastest web browser yet, given the right configuration. Then I talked about Google Chrome’s memory leak. Here’s the part where I tell you a solution.

First, let us talk about memory leaks.

Chrome Memory Leak is annoying

Memory leaks are simple. It is usually accompanied by terrible slowdown on the application experience memory leakage, and most of the time, the entire machine. If you are lucky, it gradually slows until it freezes, hangs, or crashes. That’s what a memory leak is.

Google Chrome is indeed a fast web browser, however, it has some serious issues with memory leakage. In idle mode, Chromium tabs already use up to 100MB of physical memory. When you open more tabs, the memory commit increases. The problem is that when you close a tab, the memory allocated to it isn’t released by the application. It causes the memory leak.

Why is there Memory Leak in Chrome?

I ran a thirty minute test on Google Chrome and, not to brag, I immediately knew what was causing the leak (or at least, I got some clues). On the downside, it seemed that the memory leakage is vital to Chrome, as though the browser relies heavily on it.

Technically, the memory leak is the thing that makes Google Chrome much faster than Opera. Opera saves the browsing history along with your cookies, recent graphics, media, etc. to virtual memory more than what is necessary.

Cache in Virtual and Physical Memory

When a webpage in Opera requests for data, Opera checks virtual memory—space on hard disk that functions much the same way as physical memory, only slower—and if the data is present, there’s no need to request it from the server. The process saves time, bandwidth, and cpu power.

Back to Chromium Memory Leaks

Memory leakage is the main reason that Chrome is a fast web browser. Chromium tabs don’t release previously allocated memory, because it might still be needed later. Most of the time, the increase in memory  commit is affected by client side scripting, such as Javascript, animations, and Flash.

In a nutshell, memory leakage is inevitable to Google Chrome. And after all that boring stuff, here’s the fun part. The actual fixes:

Chromium Memory Leak Fixes

Since memory leaks are vital to Chromium applications, it’s safe to say Google developers won’t be solving that problem for us soon. So we improvise.

Chromium Memory Leak Fix # 1

Restart Chrome. Sorry, but that is the simplest possible way. When you close Chrome, it releases the memory. Restart the browser, and do it all over again. Simple.

But that’s a hassle, so here’s another option:

Chromium Memory Leak Fix # 2

Clear History. It has certain dependencies, though. Cleaning your browsing history and cache in Google Chrome is as simple as pressing CTRL+SHIFT+DELETE on your keyboard. However, you have to make sure you have closed all tabs except one, a page called “about:memory.” It could also be any blank webpage or a new tab so the Chrome window does not close. Besides, “about:memory” really helps.

To summarize that, close all tabs, open “about:memory” by typing it into the address bar, then press CTRL+SHIFT+DELETE.

At the about:memory page, you should notice a significant drop in memory usage after deleting history and cache. Chrome should ease up, however, in order to load pages the browser must contact the server again.

Still, that is too complicated and tiresome, so here’s another one:

Chromium Memory Leak Fix # 3

Extensions. Here are some great Chrome extensions that helps you automate the job.

Click2Clear History

Simply click “x” button to clear history.

Memory About

Instead of typing in “memory:about” on the address bar, you can just click the blue icon.

All CPU Meter

This is a Windows 7 Sidebar Gadget that works like Task Manager, to help monitor your CPU usage.

Liked it
11 Comments For This Post
  1. Anuradha Ramkumar Says:

    That’s a wonderful share, but I’m happy with IE.

  2. Michael Says:

    I would like to preserve the history since I use it now and then to find pages I visited, so still my only possible solution is to kill Chrome, wait about 10 secs and then restart it… (and I refuse to use any other browser on this computer since they are far too slow…)

  3. Joe G. Says:

    A simpler way to release Chrome memory is to simply “pin” all your tabs. When memory runs slow (things slow down), close all but one of the pinned tabs, then reopen them when needed. The favicon for a pinned tab dims but remains visible after you close it. Given how fast Chrome is, this works pretty well.

    More detail here:

  4. anonymous Says:

    > Since memory leaks are vital to Chromium applications

    Wow. It’s been a while since I’ve seen someone this hopelessly confused about what a memory leak is.

  5. anonymous Says:

    Hey there my anonymous friend… I\’m going to take a wild guess that you are not confused. An application that claims and manages memory is not necessarily leaking memory. A leak is when the application forgets about memory it has claimed. Check it out and educate yourself before mis-educating others:

  6. Joseph Says:

    Great post man, just a question. Is consequence of this leak thing the slow page rendering when scrolling ? Suddenly scrolling in chrome is almost impossible due to slow rendering.

    Because take a look what chrome made me do … First off, I thought that it was an Operation System issue, but finally I realized, that it only happens when chrome is running. Afaik it affects even other running applications.

  7. bag charm Says:

    great post, your share.

  8. Opera Fanboy Says:

    Give Opera a try.

  9. Chi Dog Says:

    @anonymous’s who claim this is not a memory leak…

    It IS a memory leak! Maybe a consciouss one, but nontheless – a leak.

    For powerusers like myself the not releasing memory just consumes – over time – all my ram. And removing history is NOT an option!!! I need my data.

    I have another solution to this problem… Start taskmanager, and sort processes on memory usage. Take the chrome process with the highest usage, and End Process it. All tabs will default to crashed state, and memory is released. As far as I know, there is no extension to automate this (yet).

    Future Chrome distros most certainly should address this problem with a solution one way or another,. Thank you for posting!

    Chi Dog,

  10. Ofer Bar Says:

    I’ve seen several posts about how to “fix” Chrome’s memory leaks.
    Well, guess what? if you don’t own Chrome’s source code you simply CANNOT fix it from leaking.
    And it is a leaking application for sure!!
    Try this test – open Chrome and leave it running there for several hours. After a long period of time (depends how much memory you’ve got), you’ll notice a serious slow down in the way Chrome responds. That is because it keeps consuming your PC’s memory.
    I like Chrome very much and I use it all the time because it’s fast, but these memory leaks are simply BUGS, not FEATURES.
    I hope Google developers will solve that someday and not turn Chrome into just another IE…

  11. Charly Parker Says:

    I’ve been using Mozilla (same problem) but if you use it with the “help” of a tiny program called Firemin you will have the best Internet browser with all the problems about memory leaks resolved. It’s amazing how this application works: Mozilla never reachs 10 Mb of used Ram memory no matter how many tabs you open!

Leave a Reply
comments powered by Disqus