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.
$n$ is usually the memory + cpu cache size.