What are the differences between .NET in 32 or 64 bit systems?

前端 未结 3 777
有刺的猬
有刺的猬 2021-02-10 16:43

Imagine a pure .NET application which do not uses COM components nor PInvoke. Does it matters if the target system is 32 or 64 bits?

3条回答
  •  情深已故
    2021-02-10 17:09

    If the application is targetting AnyCPU, the runtime behavior will be different, in particular, the memory usage and limitations.

    On 64bit, there will not be the same 32bit memory limitations (2GB max memory theoretical, but 1.2-1.6 in practice). However, all object references are twice as large, so 64bit systems will use more memory.

    Also, 64bit systems often have extra registers, etc, so sometimes performance can improve slightly. This is platform specific, though.

    If the application is targetting x86, it will run under WoW64 and act nearly identically to how it will act in 32bit systems.

提交回复
热议问题