可以在64位CLR使用COM pressed指针? [英] Could the 64 bits CLR use compressed pointers?

查看:253
本文介绍了可以在64位CLR使用COM pressed指针?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过一些关于在一些64位Java虚拟机实现COM pressed对象指针。据我的理解是,其原理是存储引用作为一个相对的32位地址,从一个对象偏移到另一个,而不是一个完整的64位指针,来获得内存。

I've read a bit about compressed object pointers in some 64 bits Java VM implementations. As I understood it, the principle is storing a reference as a relative 32 bits address offset from one object to another instead of a full 64 bits pointer, to gain memory.

我认为,这种优化当前没有应用到.NET CLR。至少我无法找到任何关于它。难道是有可能适用于它或会是这样,因为如何在CLR内部工作是不可能的/无用/性能下降的优化?

I believe that this kind of optimization is not currently applied to the .NET CLR. At least I couldn't find anything about it. Could it be potentially applied to it or would that be an impossible/useless/performance-degrading optimization because of how the CLR internally works?

推荐答案

虽然我不知道你是否能在.NET中做这样的事情,在64位机一般具有的内存量充足(通常为4或8G ),所以节省几块4个字节将不会有太大的影响。我会把它类用处不大。

Though I'm not sure if you can do such a thing in .NET, a 64 bit machine generally has an abundant amount of memory (generally 4 or 8G), so saving a few 4 bytes won't have much effect. I would class it as "not very useful".

一个快速谷歌并没有表现出我的.NET能够支持任何迹象(甚至任何指针COM pression / ORA利息)。

A quick Google hasn't shown me any signs of .NET being able to support (or even any interest in pointer compression/ORA).

这篇关于可以在64位CLR使用COM pressed指针?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆