  We study three restrictions on normalizers or centralizers in finite
p-groups, namely: (i) |N_G(H) : H| <= p^k for every H non-normal in G, (ii)
|N_G(<g>) : <g>| <= p^k for every <g> non-normal in G, and (iii) |C_G(g) : <g>|
<= p^k for every <g> non-normal in G. We prove that (i) and (ii) are
equivalent, and that the order of a non-Dedekind finite p-group satisfying any
of these three conditions is bounded for p>2. More precisely, we get the best
possible bound for the order of G in all three cases, which is |G| <= p^{2k+2}.
The order of the group cannot be bounded for p=2, but we are able to identify
two infinite families of 2-groups out of which |G| <= 2^{f(k)} for some
function f(k) depending only on k.
