请问一下,如何在CCS当中自主设定实现内存对齐?类似与#pragma pack(2) 命令(即 设置结构体的边界对齐为2个字节,也就是所有数据在内存中是连续存储的),我编译当中会出现错误。
有没有大佬可以解答一下,非常感谢!!!!
如图所示,如果我用16位的指针指向结构体,对指针进行偏移内容拷贝的时候就会因为字节对齐的问题,导致部分内存被空白区填满,请问如何避免这个问题?



This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.