近及远指针 [英] Near and Far pointers

查看:89
本文介绍了近及远指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是我们一贯的指针(那些我们通常使用),近指针和远指针之间也是有差别的为present日C / C ++系统近及远指针实际使用情况?这necessiates使用这些特定的指针,而不是其他的C任何实际的情况下,C ++语义会有很大的帮助。

What is difference between our usual pointers(ones which we normally use), near pointers and far pointers and is there a practical usage for near and far pointers in present day C/C++ systems? Any practical scenario which necessiates use of these specific pointers and not other c,c++ semantics will be very helpful.

推荐答案

的远近关键字,有他们在分段存储器模式,英特尔收到了原点。近指针只能访问一个内存块最初64Kb的周围在称为段的大小,而远指针可以去该范围由段外,并在该段偏移量。近指针比远指针等于是在某些情况下它支付了使用它们快得多。

The near and far keywords have their origin in the segmented memory model that Intel had before. The near pointers could only access a block of memory originally around 64Kb in size called a segment whereas the far pointers could go outside of that range consisting of a segment and offset in that segment. The near pointers were much faster than far pointers so therefore in some contexts it paid off to use them.

目前接近虚拟内存和远指针都没有用了。

Nowadays with virtual memory near and far pointers have no use.

编辑:对不起,如果我没有使用正确的术语,但是这是我记得,当我与它的工作早在一天: - )

Sorry if I am not using the correct terms, but this is how I remembered it when I was working with it back in the day :-)

这篇关于近及远指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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