Using the Tolman-Oppenheimer-Volkoff equation and the equation of state of zero temperature ultra-relativistic Fermi gas based on generalized uncertainty principle (GUP), the quantum gravitational effects on the cores of compact stars are discussed. Our results show that 2m(r)/r varies with r. Quantum gravity plays an important role in the region r∼103r0
Nearby in the stack
, where
r0∼β0lp
,
lp
is the Planck length and
β0
is a dimensionless parameter accounting for quantum gravity effects. Furthermore, near the center of compact stars, we find that the metric components are
gtt∼r4
and
grr=[1−r2/(6r02)]−1
. All these effects are different from those obtained from classical gravity. These results can be applied to neutron stars or denser ones like quark stars. The observed masses of neutron stars (
≤2M⊙
) indicate that
β0
can not exceed
1037
, not as good as the upper bound
β0<1034
from simple electroweak consideration. This means that incorporating either quantum gravity effects or nuclear interactions, one obtains almost the same mass limits of neutron stars.