Outofmemoryerror
实例详解 java.lang.OutOfMemoryError
Install / Use
/learn @cncounter/OutofmemoryerrorREADME
java.lang.OutOfMemoryError 实例详解
The 8 symptoms that surface them
内存溢出的8种主要类型
The many thousands of java.lang.OutOfMemoryErrors that I’ve met during my career all bear one of the below eight symptoms. This handbook explains what causes a particular error to be thrown, offers code examples that can cause such errors, and gives you solution guidelines for a fix. The content is all based on my own experience.
笔者在工作中碰到过成千上万的 java.lang.OutOfMemoryError, 都可以归结为以下八种症状。
本手册阐述了各种内存溢出错误的形成原因,并提供了可测试这种错误的示例代码,以及解决方案。 内容都来源于笔者的一线开发和实践经验。
目录:
- OutOfMemoryError系列(1): Java heap space
- OutOfMemoryError系列(2): GC overhead limit exceeded
- OutOfMemoryError系列(3): Permgen space
- OutOfMemoryError系列(4): Metaspace
- OutOfMemoryError系列(5): Unable to create new native thread
- OutOfMemoryError系列(6): Out of swap space?
- OutOfMemoryError系列(7): Requested array size exceeds VM limit Details
- OutOfMemoryError系列(8): Kill process or sacrifice child
原文作者: Nikita Salnikov-Tarnovski -- Plumbr Co-Founder and VP of Engineering
原文链接: https://plumbr.eu/outofmemoryerror
View on GitHub95/100
Security Score
Audited on Mar 13, 2026
No findings
