Let us consider a body of mass 'm' falling towards the center of any heavenly body of mass 'M' and radius 'R' with the acceleration due to gravity 'g'.
So, force of attraction = (G.M.m)/R2
mg = (G.M. m)/R2
or, g = (G.M)/R2
Hence, g produced in any body falling freely has no effects by its mass.