ARM unaligned memory access workaround

后端 未结 3 1896
Happy的楠姐
Happy的楠姐 2021-01-11 19:30

I have to port source code from to an ARM platform that runs Linux. Unfortunately I have run into unaligned memory access problems. The source uses pointer casts and access

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-11 19:46

    There is __attribute__((__packed__)) which might help in some instances, but I really think this code should be cleaned up rather sooner than later, because it is likely that you will spend more time working around problems than it would take to fix it once and for all.

提交回复
热议问题