---
title: "Improving Firefox stability with this one weird trick"
description: "Out-of-memory crashes on Windows are often caused by exhaustion of commit space rather than physical RAM, since Windows forbids overcommit and graphics drivers commit memory for texture backing that is rarely used."
url: "https://swe.quest/articles/improving-firefox-stability-with-this-one-weird-trick-6dcdeb9550eeb654"
canonical: "https://hacks.mozilla.org/2022/11/improving-firefox-stability-with-this-one-weird-trick/"
source: "Mozilla Hacks"
published: "2022-11-22"
difficulty: "medium"
kind: "Case study"
reading_minutes: 4
tags: ["memory-management","operating-systems","browsers","resilience"]
---

# Improving Firefox stability with this one weird trick

A post on [Mozilla Hacks](https://swe.quest/sources/mozilla-hacks.md), published 2022-11-22, 4 min read, Case study. Original: [https://hacks.mozilla.org/2022/11/improving-firefox-stability-with-this-one-weird-trick/](https://hacks.mozilla.org/2022/11/improving-firefox-stability-with-this-one-weird-trick/)

## Summary

Out-of-memory crashes on Windows are often caused by exhaustion of commit space rather than physical RAM, since Windows forbids overcommit and graphics drivers commit memory for texture backing that is rarely used. Firefox 105 stops crashing immediately on a failed allocation and instead stalls briefly and retries, giving Windows time to grow the swap file or letting a memory-hungry content or GPU process die and free memory. The change cut out-of-memory browser crashes per usage hour by more than 70%, at the cost of brief jank and a small rise in tab crashes that Mozilla is now working to reduce.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Operating systems](https://swe.quest/tags/operating-systems.md) (Infrastructure)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)

## Prerequisites

- virtual memory basics
- swap files

## Keywords

Firefox, Windows, commit space, Firefox 105

## Related posts

- [Tab Unloading in Firefox 93](https://swe.quest/articles/tab-unloading-in-firefox-93-01f43dc391aafc23.md): Mozilla Hacks · 2021-10-05 · Medium · 6 min read · Browsers, Memory management, Resilience
  Firefox 93 on Windows unloads memory-heavy background tabs in least-recently-used order when system memory is critically low, keeping them in the tab bar and restoring scroll position and form data on reselect.
- [Bun v1.0.20](https://swe.quest/articles/bun-v1-0-20-4c5d451d499e769b.md): Bun · 2023-12-24 · Medium · 6 min read · JavaScript, Runtimes & VMs, Memory management, Performance engineering
  Bun v1.0.20 cuts memory usage in node:fs async operations by avoiding redundant cross-thread string clones.
- [Improving Firefox responsiveness on macOS](https://swe.quest/articles/improving-firefox-responsiveness-on-macos-b8cb4da3ea0ad313.md): Mozilla Hacks · 2022-10-10 · Hard · 6 min read · Concurrency, Memory management, Performance engineering, Operating systems, C & C++
  Firefox 103 on macOS became much more responsive under load after its customized jemalloc allocator stopped using the deprecated OSSpinLock, which spins and yields in user space and can nearly live-lock on busy systems.
- [Improved Process Isolation in Firefox 100](https://swe.quest/articles/improved-process-isolation-in-firefox-100-c5bc38aed6bfa0ee.md): Mozilla Hacks · 2022-05-12 · Hard · 9 min read · Sandboxing & isolation, Browsers, Security, Operating systems
  Firefox 100 enables Win32k Lockdown on Windows, using PROCESS\_MITIGATION\_SYSTEM\_CALL\_DISABLE\_POLICY to block web content processes from calling the historically exploitable win32k.sys kernel APIs.
- [Fixing the Git Blame Beachball](https://swe.quest/articles/fixing-the-git-blame-beachball-d67cc5c16a8fe68b.md): Zed · 2024-05-06 · Medium · 3 min read · Debugging, Performance engineering, Concurrency, Developer tools
  Committing with many files open froze Zed for about 10 seconds.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
