简体   繁体   English

什么是[完整GC(分配失败)

[英]What is [Full GC (Allocation Failure)

I am seeing Allocation failure in Full GC logging message. 我在Full GC日志消息中看到Allocation failed。

What is Allocation Failure when Full GC? Full GC时的分配失败是什么?

Is it safe to ignore? 忽视是否安全?

Allocation failure means that there was no enough contiguous memory available in the heap to allocate. 分配失败意味着堆中没有足够的连续内存可供分配。 GC runs as a result of allocation failure. GC因分配失败而运行。 If there is enough space available after GC has completed then all is good. 如果GC完成后有足够的可用空间,那么一切都很好。 Allocation failure is different from GC failure. 分配失败与GC失败不同。 GC failure happens when even after GC has completed there is not enough space available to assign to process. 即使GC完成后没有足够的空间分配给进程,也会发生GC故障。

Probably, you need to set arguments before starting application ie heap size. 可能需要在启动应用程序之前设置参数,即堆大小。 Though running GC is not mandatory, but while testing, if you run GC from application, it can give you pointer( Maybe you need to go to boundary scenario stop the world). 尽管运行GC不是强制性的,但在测试时,如果从应用程序运行GC,它可以为您提供指针(也许您需要转到边界场景停止世界)。

在GC时间期间,当没有足够的空间存储从eden / survivor区域复制的多个对象时,我们需要从tenured generation分配空间。全GC意味着停止世界发生

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM