The heap is divided into two spaces:

  1. The new space.
  2. The tenured space.

The new space is further divided into two zones:

  1. Allocate space.
  2. Survivor space.

image

Initially, the survivor space is completely empty. A new object is always created in the allocate space.

image

If when creating a new object an allocation failure takes place in the allocate space, a minor GC called scavenge is started. Scavenge works as follows.

image
Yazının tamamını okuyun (read more) »

Yorum (comment) (1)