Purpose: I have a big buffer, and I would like to have an array/slice of pointer pointing to different loc in the buffer.
What I am doing:
datPtrs := make([][]byte, n)
for i:=0; i<n; i++{
datPtrs[i] = bigBuf[i*m:(i+1)*m]
}
My Question:
- Will this copy memory? My guess is not, but I cannot find anywhere to confirm this.
- What is the best way/tool to find out whether there is memory copy or not?