Halting problem for polynomial space bounded Turing machines
You don't need to know $f$. It is sufficient to use the fact that there are only finite possible configurations.

Given an input $\langle \langle M\rangle,w\rangle$ where $M$ is a polynomially bounded TM, simulate $M$ on $w$ and record its configuration at every step. Whenever we find a repeated configuration, we can assert that $M$ does not halt on $w$. 

Note if $M$ does not halt on $w$, it must experience a repeated configuration, so the process described above will always halt. Therefore this process is the decider for the halting problem.