While there could be a point in setting limits proactively, let's answer OP's question :-)
Make an Upstart script in /etc/init/skype-killer.conf. Replace skype with Skype's binary name if its not skype, and replace 500000 (as in 500000 kB = 500 M) with the limit in kB's you wish to enforce for Skype virtual memory size and 30 with the number of seconds between checks.
This job will start on startup and keep running checking for skype memory usage. After you have copied this to /etc/init with sudo, do sudo start skype-killer to get it going, or reboot system. If you wish to revise memory usage, edit the skype-killer.conf and do sudo stop skype-killer; sudo start skype-killer.
start on startup
stop on shutdown
script
while /bin/true; do
if $(pidof skype); then
test $(cat /proc/`pidof skype`/status | grep "VmSize:" | sed -re s,VmSize:\\s+,, | cut -d" " -f1) -gt 500000 && killall skype
fi
sleep 30
done
end script
ulimit -v XXXX, so if you issue that command and then start skype from that shell then it'll limit the virtual memory usage by skype. – Samik Jun 5 '12 at 20:59