In C ++, you can use declarator __declspec( align( # ) ) to control the alignment of user data. How to do it for C #. I have two procedures written in Assembler in my dll. Arguments for procedures (two arrays) must be aligned by 16 bytes. For C ++, it works great.
I just used ads
__declspec( align( 16 ) ) double a[2]={10.2,10.6};
bossman
source share