With dram, you have to refresh every cell within a periodic interval. Usually this is handled in hardware. It would be a crazy optimization if unused pages weren’t refreshed. There would have to be a decent amount of circuitry to decide that.
I'm not suggesting it exists, but I could plausibly see something where the range to refresh could be changed at runtime. If you could adjust refresh on your 8 GB phone in 1 GB intervals (refresh up to 1/2/4/8 GB etc; or refresh yes/no for each 1GB interval), the OS could be sure to put its memory at low addresses, and the OS could do memory compaction into lower addresses and disable refresh on higher addresses from time to time. Or ... I think there's apis for allocations for background memory vs foreground memory; if you allocate background memory at low addresses and foreground memory at high addresses, then when the OS wants to sleep, it kills the process logically and then turns off refresh on the ram ... when it wants to use it again later, it will have to zero the ram cause who knows what it'll have.
I don't work at that kind of level, so I dunno if the juice would be worth the squeeze (sleep with DRAM refresh is already very low power on phone scales), but it seems doable.
This is an argument for having less memory on a hardware level. But once the DRAM is there, it uses power, whether or not it stores useful data or useless data.
There's a reason why we say unused RAM is wasted RAM.
Powering down unused physical RAM is absolutely a thing on some systems. For one thing, it's required if you ever want to support physical memory hotplug. The real issue however is that the gain from not doing DRAM refresh is clearly negligible: it's no more than the difference between putting a computer to sleep (ACPI S3), or putting a phone to sleep in airplane mode - and powering it off.
goalieca|3 days ago
toast0|3 days ago
I don't work at that kind of level, so I dunno if the juice would be worth the squeeze (sleep with DRAM refresh is already very low power on phone scales), but it seems doable.
unknown|3 days ago
[deleted]
Gigachad|3 days ago
mosura|3 days ago
mort96|3 days ago
There's a reason why we say unused RAM is wasted RAM.
zozbot234|3 days ago
kyralis|3 days ago