For example, Linux has vm.overcommit_memory
which is on by default. Windows does not have memory overcommit. Does MacOS? Is it configurable? What's the default setting?
Does Darwin (MacOS kernel) do memory overcommit
mac-osx
mac-osx
For example, Linux has vm.overcommit_memory
which is on by default. Windows does not have memory overcommit. Does MacOS? Is it configurable? What's the default setting?
Best Answer
I've tested on my MacOS and it's working. I use code from this question. And system allow me allocate more then 40Gb memory, with only 16Gb RAM onboard and 6Gb used swap(on picture process of allocation before OOM-killer execution).
My kernel version is:
I don't found possibility to configure overcommit, but look like by default it 2. But we should remember, that MacOS have dynamic swap and it compress memory, so my assumption could be wrong.