确定系统架构
系统中哪个类的哪些方法提供了有关我当前系统是 32 位还是 64 位的信息?我想确定在系统上保存对象后所提供的内存,例如,对于我当前的 Intel DualCore 32 位 XP 操作系统,每个对象为 4KB
What methods of what class in sytem offer information over whether my current system is 32 or 64 bits ? I'd like to determine the memory delivered once an object is saved on the system, for example, 4KB each for my current Intel DualCore 32 bit XP OS
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
Environment.Is64BitOperatingSystem
来确定您的系统架构,但尚不清楚“对象保存在系统上后交付的内存”是什么意思。如果您谈论的是数据何时保存在硬盘驱动器上,那么您指的是硬盘驱动器的块大小(顺便说一下,4096B 或 4K,正如您所描述的那样是默认值) Windows NTFS 卷的块大小)。如果是这种情况,那么这与您的处理器没有任何关系;这是硬盘驱动器上特定分区的格式化选项。我不知道用于检查这一点的 .NET 机制。
You can use
Environment.Is64BitOperatingSystem
to determine your system architecture, but it's unclear what you mean by "the memory delivered once an object is saved on the system".If you're talking about when data is saved on your hard drive, then what you're referring to is the block size of your hard drive (incidentally, 4096B or 4K, as you describe is the default block size for Windows NTFS volumes). If this is the case, then that is not related to your processor in any way; that's a formatting option for a particular partition on a hard drive. I am not aware of a .NET mechanism for checking that.