Home > Java > javaTutorial > What is the concept of Java memory allocation

What is the concept of Java memory allocation

PHPz
Release: 2023-04-29 13:49:06
forward
1252 people have browsed it

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.

What are the commonly used java frameworks

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template