A register variables is that which got space in CPU internal register sets
this requst can be granted or rejected by CPU ,by register veriable the processing speed become much faster for that variable.
The block they are declared in.
in register
Either in registers or on the stack.
$_SESSION['name'] = "RAGHAV";
Asks the compiler to devote a processor register to this variable in order to speed the program's execution. The compiler may not comply and the variable looses it contents and identity when the function it which it is defined terminates.
Registry variables can be identified with registry allocation. The programmer will decide on the variables that need to be assigned to the registry, and variables not assigned to the registry will be held in RAM.
Faster execution of code.
* These are all implementation defined. Access to `register' specified indentifiers should be as fast as possible, so the compiler may place the value in a machine register. However, the compiler is free to treat a `register' declaration as an `auto' declaration. * Where free memory is maintained is an OS specific concept. Instructions are generally stored in code segement. Local Variables are stored in Stack. Register variables are stored in Register. Global & static variables are stored in data segment. The memory created dynamically are stored in Heap And the C program instructions get stored in code segment.
A register specifier for a variable is a compiler hint that the variable is used often and should be kept in a CPU register. The compiler will treat the variable as automatic, but it will give it preference for staying in a register between sequence points.
register behaves like auto class but auto variables are actually local variables.They are created when the functions are created but they are destroyed when the fns is exited.But register-variables are used to speed up the operations
here, just the registers are used to store the temporary data in the variables instead of RAM.
A register variables is that which got space in CPU internal register sets this requst can be granted or rejected by CPU ,by register veriable the processing speed become much faster for that variable.