Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How JVM Runtime data area

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to run the JVM data area, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

1. Runtime data area

1) Heap: thread sharing, storing newly created objects.

2) method area: thread sharing, storing class information, constants, static variables, etc.

3) Virtual machine stack: thread independent, also known as thread stack. Used to store local variables within the thread, first in and then out of the FILO. The stack consists of stack frames, which are divided into local variables, Operand stacks, dynamic links and method exits. Smaller local objects generated in threaded methods may also be stored in the virtual machine stack. Local variable scale: store local variables.

Stack frame: java allocates a stack frame in stack memory for each method to isolate local variables in each method.

Operand stack: temporary memory space used to process data when a thread is running.

Dynamic links:

Method exit: returns the execution position of the parent method when the method execution is completed.

4) Local method stack: the memory space allocated when java calls local methods (native-decorated methods).

5) Program counter: the bytecode line number indicator executed by the current thread, recording the line to which the code is executed

two。 Parameter setting

Heap:

-minimum Xms.

-maximum Xmx.

Method area:

-XX:MetaSpaceSize defaults to 21 MB. Gc will be performed when the memory is almost full, and the capacity expansion is determined according to the amount of space left after the gc. It is generally set to 256m in production.

-XX:MaxMetaSpaceSize defaults to-1 and does not limit the maximum value.

Stack:

-Xss defaults to 1m

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report