Go escape analysis
September 20, 2023
The meaning of
escapes to the heapis variables needs tobe shared across the function stack frames[between main() and Println()] …… So
globally access variablesmust bemoved to heapas it requires runtime. So the output line 11:2 shows the same as the data variable moved to the heap memory.