[Bug 59476] New: WINE_RESERVE VM region count grows unboundedly (~20k regions/min), exhausting system memory
http://bugs.winehq.org/show_bug.cgi?id=59476 Bug ID: 59476 Summary: WINE_RESERVE VM region count grows unboundedly (~20k regions/min), exhausting system memory Product: Wine Version: 11.0 Hardware: x86-64 OS: MacOS Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: junkwalkers@gmail.com Created attachment 80465 --> http://bugs.winehq.org/attachment.cgi?id=80465 vmmap and memory growth over time. On macOS (Apple Silicon, Rosetta 2), running applications that perform frequent VirtualAlloc/VirtualFree cycles (such as .NET applications) causes Wine's WINE_RESERVE address space to fragment into an ever-growing number of mach VM regions. The macOS kernel never coalesces adjacent freed regions, so the region count grows indefinitely. Each region carries kernel metadata overhead, and the cumulative overhead eventually exhausts system memory. Steps to reproduce: 1. Run SolidWorks 2025 (or any .NET-heavy application) on macOS with Wine 11.0 2. Run: vmmap -summary <pid> (repeating every 30 seconds) 3. Observe WINE_RESERVE region count growing continuously Measured data (SolidWorks 2025, macOS 26.3, Apple Silicon, 16GB RAM): At launch (~30s): WINE_RESERVE: 8.0G virtual, 21,748 regions VM_ALLOCATE: unknown, ~3,094 regions Physical footprint: 2.4G After 5 minutes: WINE_RESERVE: 8.0G virtual, 113,059 regions (+91,311 new regions) VM_ALLOCATE: 2.0G virtual, 29,892 regions Total regions: 176,901 Physical footprint: 9.7G After 15 minutes: WINE_RESERVE: 8.0G virtual, 113,909 regions VM_ALLOCATE: 9.9G virtual, 159,877 regions Total regions: 307,327 Physical footprint: 17.7G Region growth rate: approximately 20,000 new regions per minute. The WINE_RESERVE virtual size stays constant at 8GB — it is not allocating more memory. It is fragmenting the existing reservation into more and more tiny mach VM regions. macOS tracks kernel metadata per region, and at ~300,000 regions the overhead triggers "Your system has run out of application memory." On Linux this is not a problem because the kernel can coalesce adjacent mmap regions with identical protections. macOS mach_vm_allocate regions are permanent and never merge. Full vmmap -summary output is attached. System: macOS 26.3, Apple Silicon (M-series, 16GB RAM), Wine 11.0 stable, Rosetta 2 translation -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59476 junkwalkers@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86-64 |arm -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla