Now, when vlc runs amok, a memory allocation will fail and vlc will crash.
Note that messing with the overcommit settings can crash your machine (until you reboot) and the 100 value may need tuning. If processes start crashing before you even start VLC, raise it by 50. If your machine goes down rather than just VLC crashing, lower it by 50.
To work around this you can play with the kernel's overcommit settings:
sudo bash vm/overcommit_ ratio vm/overcommit_ memory
echo 100 > /proc/sys/
echo 2 > /proc/sys/
exit
vlc
Now, when vlc runs amok, a memory allocation will fail and vlc will crash.
Note that messing with the overcommit settings can crash your machine (until you reboot) and the 100 value may need tuning. If processes start crashing before you even start VLC, raise it by 50. If your machine goes down rather than just VLC crashing, lower it by 50.