From what I remember, gcc always does a shallow copy (case 1) and as anoptimization, it implements copy-on-write.
Hi,
Say I have a structure :
typedef struct {
...
...
...
} tmp;
And I do this :
tmp a[256];
tmp t;
a[0] = t;
Now, for this structure copy how does gcc decide that :
1) It should generate a call to memcpy
2) Generate instructions to manually do the copy.
What is the threshold for the structure's size that changes gcc's
behaviour ?
And is there any gcc parameter to change this threshold value ?
regards,
Sujith.
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc