Grain boundary segregation and grain-boundary heterodiffusion