OT: Restrict Memory Usage of Win32 Process?
Thomas Charron
twaffle at gmail.com
Mon Jun 2 17:11:51 EDT 2008
On Mon, Jun 2, 2008 at 4:40 PM, Ben Scott <dragonhawk at gmail.com> wrote:
> On Mon, Jun 2, 2008 at 4:04 PM, Thomas Charron <twaffle at gmail.com> wrote:
>> The SetProcessWorkingSetSize and SetProcessWorkingSetSizeEx Win32 API calls.
> Does that actually limit the amount of memory a process can use, or
> just the working set (pages in RAM)? The docs I found via Google seem
> to imply the later. If so, a process could keep allocating more
> memory, it would just have its pages swapped to disk ("page file")
> sooner than otherwise. In theory, that might still lead to virtual
> memory exhaustion. Or is my understanding wrong?
>
> http://msdn.microsoft.com/en-us/library/ms686237(VS.85).aspx
Win32 has no such concept. Each application can allocate up to a
maximum of 4GB of virtual memory, (or potentially less, depending on
what Windows decides is available).
--
-- Thomas
More information about the gnhlug-discuss
mailing list