3 ms·
In windows and in linux(it might be the similar case with OSX also, I haven't tried it), I find it is not easy or straightforward to set RAM usage limitations o
by billfruit 8y ago
In windows and in linux(it might be the similar case with OSX also, I haven't tried it), I find it is not easy or straightforward to set RAM usage limitations on processes, I wonder why do not the OSes provide the user easy controls on that.
- sigstoat 8y agothat will replace slowness with crashes, as very few programs are written to survive being told that no more memory is available.
- imtringued 8y agoI think crashes already happen but the process that gets killed may not be the one that caused the system to run out of memory in the first place.
- copperx 8y agoTaking Operating Systems 101 will answer your question.
- dang 8y agoMaybe so, but please don't post unsubstantive comments here, and especially not dismissive ones. If you know more than someone else, share some of your knowledge so we call learn. Or, if you don't have time or don't want to, simply don't post. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- Someone1234 8y agoYou can but you'd hate the results, since the OS would have to page memory to/from disk like crazy when the working set runs out. See: https://blogs.technet.microsoft.com/mrsnrub/2009/12/08/windows-system-resource-manager-wsrm-does-exactly-what-it-says-on-the-tin/ https://blogs.technet.microsoft.com/mrsnrub/2009/12/08/windo... Or: https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-setprocessworkingsetsizeex https://docs.microsoft.com/en-us/windows/desktop/api/memorya... You can call the Win32 API directly from Powershell if you wish (w/QUOTA_LIMITS_HARDWS_MAX_ENABLE). System Resource Manager is only available on Windows Server. All you're doing is limiting how much physical memory the process can consume before it pages. In either case the process will continue to consume all the memory it desires, it just varies where the additional consumption is stored.