|
|
|
|
|
by basch
2319 days ago
|
|
OS > Hey I need RAM Browser > OK we can purge these tabs first is how it should work. If the first step doesnt happen, its not clear if the second one should execute by itself. Id be much more concerned about background CPU usage. Eats battery, and actually slows the computer down. That all said, its pretty clear that browsers are leaking RAM sometimes. I remember bed bath and beyond using 9 or 12GB of ram the other month. |
|
That's not how it works. Browser might monitor free system memory actively and release memory if the system runs low, but at least Firefox doesn't do that.
There is no mechanism (in Windows, Linux) that allows the OS to notify applications of memory pressure or that allows the application to tell the OS that some allocations can be thrown out if need be. (Windows has a mechanism - MEM_RESET - that only works with paged out allocations)
Edit: Windows 10 (8?) actually expands on MEM_RESET with Offer/ReclaimVirtualMemory, but I kinda doubt browsers use this, because these have similar semantics to MEM_RESET (except they seem to work without paging, which is good). For an application that wants to cache not-well-defined amounts of data itself these might be very useful though, because you can make the data structure simple enough that it works with these.