Mozilla implemented a trick in Firefox 105 to improve stability on Windows by retrying failed memory allocations, which led to a 70% reduction in out-of-memory crashes. This trick takes advantage of Windows' behavior of resizing the swap file when it's almost full, allowing the allocation to succeed on the second try. The article explains how Windows handles memory differently than other operating systems, which can lead to applications running out of memory even when there is plenty of physical memory available. This change has significantly improved Firefox's stability on Windows.