I\'m developing application for an embedded system with limited memory (Tegra 2) in C++. I\'m handling NULL results of new and new[] throughout the
I am not sure what kind of OS You are using, but You should check if it supports opportunistic memory allocation like Linux does.
If it is enabled, the following may happen:
new or malloc gets a valid address from the kernel. Even if there is not enough memory, because ...Solution: Disable overcommitting of memory:
echo 2 > /proc/sys/vm/overcommit_memory