Are there any considerations needed to be taken running your .net program on x64 vs x86?

后端 未结 7 1051
Happy的楠姐
Happy的楠姐 2021-01-17 11:05

I believe the architecture type (x86 vs x64) is abstracted away for you when making .Net programs, but are there any other considerations that can cause problems?

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-17 11:19

    • Reading and writing to 64 bit values is not thread safe on a 32 bit platform. Reading a 64 bit value takes two operations which could be interrupted by a context switch. See the MSDN article on Threading.Interlocked.Read for more information.

    • Also agree entirely with torial's answers! :-)

提交回复
热议问题