Google Chrome to adopt Windows 10 TerminateProcess API to cut memory consumption

Posted on Monday, December 28 2020 @ 10:53 CET by Thomas De Maesschalck
GOOG logo
Earlier this year, Google tried adopting Microsoft’s Segment Heap technology to reduce the memory consumption of the Chrome browser on Windows 10 system but this technique didn't pan out as it caused browser instability. Now Google is planning to use Windows 10’s TerminateProcess API to completely shut down browser processes.
Exiting a process cleanly is difficult and expensive. Avoiding race conditions becomes almost impossible with complex software and a clean exit can be quite slow. Waiting on all threads, paging in code and data, and race conditions make it not worthwhile.

We have been gradually moving towards using TerminateProcess for more process types. Although the majority of the shutdown processes tracked by this bug are in utility processes this change uses TerminateProcess for all process types. We should not need to let destructors run so it should be safe to never use exit() (or to make it opt-in).
This should result in lower memory consumption versus the method Chrome is currently using. One issue it should prevent is that under current condition, memory usage doesn't go down when you close a couple of tabs or even a full browser window.

Source: MS PowerUser


About the Author

Thomas De Maesschalck

Thomas has been messing with computer since early childhood and firmly believes the Internet is the best thing since sliced bread. Enjoys playing with new tech, is fascinated by science, and passionate about financial markets. When not behind a computer, he can be found with running shoes on or lifting heavy weights in the weight room.



Loading Comments