且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么我应该使用 64 位 JDK 而不是 32 位版本?

更新时间:2022-11-01 15:08:19

不,对于您的开发时活动,32 位可能就足够了.

No, for your development-time activities, 32 bits is likely to be enough.

最新的 JVM 支持指针压缩,但除此之外,64 位版本的应用程序需要更多内存才能运行.如果您的应用程序需要处理更多内存,则仅使用 64 位(32 位应处理 4 Gb,但有时操作系统考虑会减少这种情况).

The newest JVMs support pointer compression, but otherwise, the 64-bit version of an application requires more memory to run. Only use 64-bits if your application needs to address more memory (32 bits should address 4 Gb, but OS considerations sometimes make this less).

除了浪费一点内存之外,64 位版本应该不是问题,但有趣的是,我听到抱怨的通常坚如磐石的 JVM 的所有莫名其妙的崩溃都在 64 位版本中.可能是操作系统或其他因素,但如果您没有理由使用 64 位,那为什么还要碰运气呢?

Besides wasting a bit of memory, a 64-bit version shouldn't be a problem, but anecdotally, all of the inexplicable crashes of the usually rock-solid JVM I hear complaints about are in 64-bit versions. It could be the OS or other factors, but if you don't have a reason for 64 bits, why push your luck?