当前位置:网站首页>If a thread overflows heap memory or stack memory, will other threads continue to work
If a thread overflows heap memory or stack memory, will other threads continue to work
2022-06-25 15:19:00 【xiao326791055】
If a thread has a heap memory overflow , Or stack memory overflow , Whether other threads will continue to work
Don't bullshit , Basic information of synchronization status and identification hash code , Whether it's a heap memory overflow , Or stack memory overflow , The rest of the threads will continue to work
1: First, test the heap memory overflow
**1.1: The trial IDEA test , The code is as follows :**

**1.2: Then set the running memory size **

1.3: Appoint main Method , And open jvisualvm
jvisualvm The position of is JDK Of bin In the folder

View the running of the code jvisualvm Monitoring the page

You can see in the 10 spot 25 branch 33 Once per second GC, At this point, let's look at our output records , Whether there is a memory overflow

And after a heap memory overflow , Other threads are still executing .
2: Stack memory overflow is the same as heap memory overflow , Other threads will still execute
2.1: The stack memory code is as follows

2.2: give the result as follows :

After thread memory overflow , The memory occupied by threads will be released quickly , It will not affect the running of other threads .
边栏推荐
- Mining procedure processing
- Pytorch distributed test pit summary
- BM setup process
- Boost listening port server
- Golang channel reading data
- [C language] 32 keyword memory skills
- Yolov4 coco pre train Darknet weight file
- Summary of regularization methods
- QT pattern prompt box implementation
- Arithmetic operations and expressions
猜你喜欢

Ubuntu 20.04 installing mysql8.0 and modifying the MySQL password

One question per day,

Js- get the mouse coordinates and follow them

Paddlepaddle paper reproduction course biggan learning experience

QT loading third-party library basic operation

Learning C language today is the first time to learn C language. In college, C linguistics is not good, but I want to make progress, so I found a beep video on the Internet to learn C language

Data feature analysis skills - correlation test
![[paper notes] rethinking and improving relative position encoding for vision transformer](/img/6b/8b1c192e0ce715789465fa9ccaabfc.jpg)
[paper notes] rethinking and improving relative position encoding for vision transformer

Custom structure type

Solution of push code failure in idea
随机推荐
Stack and queue
Automatic correlation between QT signal and slot
Compile Caffe's project using cmake
The robot is playing an old DOS based game
网上办理股票开户安全吗?
2.18 codeforces supplement
Design and implementation of timer
QT pattern prompt box implementation
SPARQL learning notes of query, an rrdf query language
Leetcode122 timing of buying and selling stocks II
C language LNK2019 unresolved external symbols_ Main error
Some usage records about using pyqt5
Judging the number of leap years from 1 to N years
(translation) json-rpc 2.0 specification (Chinese version)
[C language] 32 keyword memory skills
Pytorch distributed test pit summary
BM setup process
在打新债开户证券安全吗,需要什么准备
QT database connection
CV pre training model set