There's no good reason why these should't just be constants. The patch also appends "MiB" to some of the C++ values to make their meaning clearer. This patch fixes one outright bug, and one inconsistency. The bug is due to a prefname mismatch: - ContentPrefs.cpp and AvailableMemoryTracker.cpp use "memory.low_virtual_mem_threshold_mb". - all.js uses "memory.low_virtual_memory_threshold_mb". Which means that "memory.low_virtual_memory_threshold_mb" showed up in about:config, but if you changed it nothing would happen because the callback listened for changes to to "memory.low_virtual_mem_threshold_mb"! Now for the inconsistency. The above means we actually use a value of 256 for the virtual memory threshold, even though all.js says 128. But we *do* use a value of 128 for the commit space threshold, because that's what all.js says and that prefname is used correctly everywhere. The patch changes the commit space threshold to 256 for consistency with the virtual memory threshold. What a mess!
14 KiB
14 KiB