Influence of curvature on impurity gettering by nanocavities in Si