[Development] QtCore missing check for memory allocation

Ulf Hermann ulf.hermann at theqtcompany.com
Wed Feb 25 17:56:10 CET 2015


> You are contradicting yourself. Just a few minutes ago you considered it
> a problem, if you don't know the exact location of a failed allocation.
> Now when it comes to overcommiting you say not knowing the location is
> not a problem. I am confused now.

When overcommitting, the kernel will give you a range of virtual memory that isn't actually backed by physical memory. It will then map the memory as you access it. If you try to access too much of it and the kernel runs out of physical memory, it will kill the process. You can't use that mechanism to overwrite pieces of memory you didn't want to overwrite - or at least I don't see a way to do so.

Ulf



More information about the Development mailing list