Changes

no edit summary
Line 14: Line 14:     
: We only care about 64-bit Windows here, since players on 32-bit Windows can't use this. Both <tt>Stardew Valley.exe</tt> and <tt>StardewModdingAPI.exe</tt> are marked <tt>LARGEADDRESSAWARE</tt>, so in theory they should have access to a full 4GB of memory space. It'd be great to provide a more accurate explanation on the page, but do you know why players often report <tt>OutOfMemoryException</tt> errors with 1–3GB memory used despite having plenty of available system memory? For example, here's [https://github.com/Pathoschild/SMAPI/issues/749 an <tt>OutOfMemoryException</tt> crash on a system with 32GB of memory with 1.2GB in use by the game]. —<small>[[User:Pathoschild|Pathoschild]] ([[User talk:Pathoschild|talk]]) 15:26, 29 May 2021 (UTC)</small>
 
: We only care about 64-bit Windows here, since players on 32-bit Windows can't use this. Both <tt>Stardew Valley.exe</tt> and <tt>StardewModdingAPI.exe</tt> are marked <tt>LARGEADDRESSAWARE</tt>, so in theory they should have access to a full 4GB of memory space. It'd be great to provide a more accurate explanation on the page, but do you know why players often report <tt>OutOfMemoryException</tt> errors with 1–3GB memory used despite having plenty of available system memory? For example, here's [https://github.com/Pathoschild/SMAPI/issues/749 an <tt>OutOfMemoryException</tt> crash on a system with 32GB of memory with 1.2GB in use by the game]. —<small>[[User:Pathoschild|Pathoschild]] ([[User talk:Pathoschild|talk]]) 15:26, 29 May 2021 (UTC)</small>
 +
 +
:: I would say that it isn't true in _any_ situation.
 +
 +
:: * On 32-bit Windows, it isn't true as far as I have ever been aware. `increaseuserva` specifies that you want processes to have 3 GiB of virtual address space available instead of the default 2 GiB. The default was specified as many much older programs assumed that logical addresses wouldn't be larger than that and would fail.
 +
:: * Process logical address space _is not shared between processes_. _Physical_ memory is, but that is mapped to processes (into their logical address space). Even 32-bit NT can address more than 4 GiB of physical RAM via PAE. If you have two 32-bit processes, they do not share a 2 GiB logical address space. Or a 3 GiB logical address space. They have their own logical address spaces. They compete for _physical_ memory, but that's true of any system.
 +
:: * On 64-bit Windows, obviously the same applies. Except that if a process is flagged as `LARGEADDRESSAWARE`, it gets access to the full 4 GiB address space instead of 3, as the kernel does not need to be mapped within the 4 GiB address space (during an interrupt, the processor switches back to long mode and the kernel can access its own memory which is mapped outside of what the process is aware of).
 +
 +
:: [[User:Ameisen|Ameisen]] ([[User talk:Ameisen|talk]]) 23:22, 10 October 2021 (UTC)
8

edits