Profile Image
PiPi

to-space exhausted error

Before this phenomenon occurred, there was a "to-space exhausted" error. Since then, no objects have been allocated in the Eden area, and the Survivors area has also been zero. There are the following questions:

 

(1) Why can't G1 allocate some of the Eden regions to the Survivors area under such circumstances?

 

(2) The Eden occupancy is zero, indicating that new objects are no longer being allocated memory in Eden. Why is that?

 

(3) After this, when there is a request for object allocation again, a Full GC is initiated. Why can't objects be allocated in Eden at this time?

  • g1gc

Please Sign In or to post your comment or answer

Profile Image

Unni Mana

Hello Pipi,

 

There could be several reasons to this behavior. Some of them are:

 

1. GC Pause time may restrict the gc event. In that case no copying will happen to eden or survivor regions

 

2. There can be some survivor region space policy and because of that it is not copying

 

3. If the  JVM argument XX:survivorRatio is set, then also it will affect this behavior

 

Profile Image

PiPi

Hello Unni Mana,

 

Thank you for your help and answers!

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • g1gc