|
D-Var (Derived Variable)is a new variable segmentation technique of c++ in which two different values/data of similar data type (First values/data must be const) sharing same variable name and physical memory address. When a program references a D-Var, Compiler use its memory location the offset is added to the segment base to generate a physical memory address. An implementation of using D-Var variable segmentation that entire segment is swapped back and forth between main memory and secondary storage. When a segment is swapped in, the operating system has to allocate enough contiguous free memory to hold the entire segment. Often memory fragmentation results in there being not enough contiguous memory even though there may be enough in total. Its something Like a (Variable variables ) concept PHP,But as per D-Var variable segmentation technique is kind new kind of c++ code optimization for better per formation In PHP sometimes it is convenient to be able to have variable variable names. That is, a variable name which can be set and used dynamically. A normal variable is set with a statement such as: $a = 'hello'; ?> A variable variable takes the value of a variable and treats that as the name of a variable. In the above example, hello, can be used as the name of a variable by using two dollar signs. i.e. $$a = 'world'; ?> At this point two variables have been defined and stored in the PHP symbol tree: $a with contents "hello" and $hello with contents "world". Therefore, this statement: echo "$a $"; ?> produces the exact same output as: echo "$a $hello"; ?> i.e. they both produce: hello world. ==References== (Variable variables ) (Understanding PHP variable variables - Foundation PHP ) (Variable variables – Hacking with PHP - Practical PHP ) . 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「D-Var」の詳細全文を読む スポンサード リンク
|