The busy beaver function gives very loose upper bound...
A better bound: If the computer can be described with $n$ bit of information, and a program did not terminate with $2^n+1$ operations, then the program has a infinite loop.
Only if you take a very liberal definition of memory. The following probably isn't an infinite loop, even though it'd look like one under normal definitions of memory (either RAM or RAM+disk):
$ while ping -W 2 -q -c 1 www.google.com; do sleep 10; done
$n$ is usually the memory + cpu cache size.