c register修饰符
来源:互联网 发布:网络nat类型限制 编辑:程序博客网 时间:2024/06/05 00:18
A register variable declaration advises the compiler that the variable in question will be heavily used.
register的声明的变量,告诉编译器,这个变量将会被频繁使用。
The idea is that register variables are to be placed in machine registers, which may result in samller and faster program.
这就要求将register变量存放在机器寄存器中,这可以带来更小,更快的程序。
But programs are free to ignore the advice.
但是,程序有权忽略这个建议。
The register variable declaration can only be appied to automatic variables, and to the formal parameters of a functions.
这个寄存器变量声明不仅仅可以用在自动变量上,也能用在函数的参数上。
In practice, there are restrictions on register variables, reflecting the realitied of underlying hardware.
实际上,对register的使用是有限制条件的,这个体现在具体硬件上。
Only a few variables in each function may be ketp in registers, and only certain types are allowed.
每个函数中只有很少的变量能够存放在寄存器中,而且,只是确定的类型可以存放在寄存器中。
Excess register declarations are harmless, however, since the word register is ignored for excess or disallowed declarations.
过多的使用寄存器变量并没有坏处,然而,由于“register”会被忽略的。
And it is not possible to take address of a register variable, regardless of whether the variable is actually placed in register.
特别注意:不能用&取地址符号,去获取一个register变量的地址,无论这个变量是否被实际得存放在寄存器里了
- c register修饰符
- register 修饰符
- register修饰符
- register volatile 修饰符
- register修饰符
- register修饰符
- register 类型修饰符
- auto、register、extern修饰符
- C/C++中存储类型修饰符的区别(auto、static、register、extern、volatile、restrict)
- auto、register、static、extern等存储类修饰符的区别 - [C/C++编程]
- C/C++中存储类型修饰符的区别(auto、static、register、extern、volatile、restrict)
- 关于register修饰符以及在C 与 C++中的区别
- C语言存储类、链接(十八)--extern、static、register修饰符
- C中的修饰符*()[]
- C语言修饰符
- C修饰符const
- 【C#】 访问修饰符
- (C/C++)register关键字
- 苦逼的SEOer出路在哪里呢
- [jQueryUI] - Chosen:select下拉选择框美化插件及问题
- [jQueryUI] - Chosen:select下拉选择框美化插件及问题
- 不愿看到Java开发者再做的10件事
- 理解hasOwnProperty()的作用
- c register修饰符
- 正则表达式 年月日时分秒格式匹配,如: 2012/02/05 19:50:50
- linux gpio详解
- 找出出现次数最多的数字(需要考虑顺序)
- 返回顶部完整代码
- 用CSS实现HTML网页图文混排效果
- iscsi共享存储 转自:http://aceruser.blog.51cto.com/2772529/668593
- 了解Linux的进程与线程
- 写一份好简历