简体   繁体   English

Java中的分配失败

[英]Allocation failure in Java

I have a method which hits DB and fetches lot of records into memory for processing. 我有一个方法可以访问数据库并将大量记录提取到内存中进行处理。 After I fetch the records and before I start processing, I get the following log message. 在我获取记录之后,在开始处理之前,我收到以下日志消息。 What does it mean ? 这是什么意思 ?

164575.034: [GC (Allocation Failure)  4937664K->3619624K(5602816K), 0.0338580 secs]

Options: 选项:

java.opts=-d64 -Xmx8g -XX:+PrintGCTimeStamps -verbose:gc -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+UseParallelOldGC

It just basically tells you that it had to run GC to allocate additional memory, it does not fit in memory otherwise. 它基本上告诉你它必须运行GC来分配额外的内存,否则它不适合内存。 So it is just a reason for GC. 所以这只是GC的一个原因。

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

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