Memory addressing and variable

Let's imagine that we all know Excel software Excel software. Excel table from the cell components. Each cell has its own unique identifier (A1, A2, ... B1, B2). If you know of a cell identifiers, you can always write some values ​​to which, or to obtain any value stored therein. Computer memory is organized and this is also very similar.

. "Program is running, programs and program data stored in memory all of the computer's memory is divided into small cells or byte unique identifier or number of each unit has an associated: 0,1,2, 3, ...... (numbering begins with 0). If you know the number of a unit, then you can save the data in it. or from which to obtain data. some of the units will be stored in the code of the program, namely the processor command set. means stores other data used by the program. the number of each unit is referred to as its address. "

"Processor know how to execute commands loaded into memory. Almost all of the processors are similar to the command 'Get data from certain units, to perform certain actions, then send the results to other units'. We will count one hundred simple commands combined to get some complex and useful commands. "

"Why do I need these commands it?"

"When the variables declared in the code, it is assigned a number of unused memory which is usually a few bytes need to specify the type of information stored in the program where the variable declaration:... A number, text, or other data convenience, assign a unique name for each variable. "

"Does this mean that a variable is a name, type, part of the memory, but also a value?"

"All these together will let us look at some examples:."

img

millions of data into the system memory will not explode it?

Interviewer: chat and micro-channel scan code to log Taobao The principle behind?

SpringBoot project build depth tuning mirror Docker

CentOS7 install Maven

the Spring operating Redis achieve the Cache Data Cache (lower)

the Spring operating Redis achieve the Cache data cache (on)

● Java people should know SpringBoot For Kafka (on)

the Java people should know SpringBoot For Kafka (lower)

SpringBoot various ways to read the configuration file parameters

SpringBoot Detailed operating ElasticSearch

SpringBoot Caffeine use the local cache

This article from the blog article multiple platforms OpenWrite release!

Guess you like

Origin juejin.im/post/5e5a1e92f265da570970246a