storage location

---Restore content begins---

1) Register. This is the fastest store and usually consists of flip-flops. Registers cannot be directly controlled, nor can they be felt in the program.

2) Stack. Located in RAM (random access memory), references to objects are stored on the stack.

3) heap. Queue first, Java objects are stored on the heap

4) Constant storage. Constant values ​​are usually stored directly inside the program code, and sometimes in embedded systems, constants can be stored in ROM (Read Only Memory) because the constants themselves cannot be changed.

5) Non-RAM storage. If the data lives completely outside the program, then it can be free from any control of the program and can exist even when the program is not running. Two of the basic examples are stream objects and persistent objects. In a stream object, the object is converted into a stream of bytes, usually sent to another machine. In "persistent objects", objects are stored on disk.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324782110&siteId=291194637