Reputation: 2551
I know about flag -XX: PretenureSizeThreshold which can be used to set to limit the size of allocations in YG.
Apart from that is there any other scenario/condition where new objects can be allocated space from tenure space ?
what heppens if new object size is larger than the eden space ? will the Young generation GC happens or the object is allocated from tenure area?
Upvotes: 0
Views: 634
Reputation: 719336
what happens if new object size is larger than the eden space ?
There are a number of things that could happen:
The actual answer is JVM version dependent; e.g. see question 29 of this FAQ which says what happened (respectively) in HotSpot 1.4.2 and earlier Sun JVMs.
Upvotes: 1