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