Concept
1. Memory is an important component of the computer. It is a temporary storage area and is used to run programs. The Java virtual machine must run programs, allocate and manage memory.
The programs we write are stored on the hard disk, and the programs on the hard disk cannot be run.
Must be put into the memory to run, and the memory will be cleared after the operation is completed.
2. The memory allocation area is divided into
registers: cannot be controlled in the program;
stack: stores basic types of data and object references. , but the object itself is not stored in the stack, but in the heap;
Heap: stores data generated with new;
Static domain: stored in the object defined with static Member;
Constant pool: stores constants.
3. Understanding the stack
The basic types of variable data and object reference variables defined in the function are allocated in the stack memory of the function. When a variable is defined in a certain code, Java allocates the storage space of the variable on the stack. After the variable exits the scope, Java automatically releases the storage space allocated by the variable.
1. SpringMVC, Spring Web MVC is a lightweight Web framework based on Java that implements the request-driven type of Web MVC design pattern.
2.Shiro, Apache Shiro is a security framework for Java.
3.Mybatis, MyBatis is an excellent persistence layer framework that supports ordinary SQL queries, stored procedures and advanced mapping.
4.Dubbo, Dubbo is a distributed service framework. 5. Maven, Maven is a project management and build automation tool.
6.RabbitMQ, RabbitMQ is a high-concurrency and high-reliability AMQP message queue server implemented in Erlang.
7.Ehcache, EhCache is a pure Java in-process caching framework.
The above is the detailed content of What is the concept of Java memory allocation. For more information, please follow other related articles on the PHP Chinese website!