By using a marker technique based on nanowire (NW) heterostructure, we have identified the Ga-limited and N-limited GaN NW growth regimes, which are shifted in comparison to those in two-dimensional GaN layers. The results show that the Ga atoms diffusing along NW sidewalls have a significant contribution to the NW vertical growth. By reducing the substrate temperature, Ga-rich conditions locally activate the lateral growth. In contrast to Ga atoms, the contribution of Al and N adatom diffusion to the NW vertical growth is negligible. Finally, the control of GaN/AlN heterostructures in NWs is demonstrated.