As I understand when using G1 GC heap is partitioned into a set of equal-sized heap regions.
How JVM allocates new objects in the regions? Which region is choosed for the allocation?
Here is what the original Garbage-First Garbage Collection Research Paper says about allocation:
Allocation in a heap region consists of incrementing a boundary, top, between allocated and unallocated space. One region is the current allocation region from which storage is being allocated. Since we are mainly concerned with multiprocessors, mutator threads allocate only thread-local allocation buffers, or TLABs, directly in this heap region, using a compare-and-swap, or CAS, operation. They then allocate objects privately within those buffers, to minimize allocation contention. When the current allocation region is filled, a new allocation region is chosen. Empty regions are organized into a linked list to make region allocation a constant time operation.
In general, you need to realize that G1 is still generational garbage collector. So, that means that object allocation happens in the Young Generation (Eden space) for the usual case. From this perspective, there is nothing new in G1. The difference between G1 and e.g. CMS is that the Young Gen is split into several equally sized regions.
The Eden regions are collected in a stop-the-world pause and the objects are compacted into the To space, so it is not really a problem having those object allocated all over the different Eden regions.
Humongous object allocation happens in the humongous regions - this is a special case of allocation for large objects.