GC for HotSpot Java, V8 Nodejs, PHP and Python


  • Java is using Generation strategy for GC.
  • The memory will be divided into 3 sections: Young generation, old generation, and metaSpace
  • The young generation contains: Eden, from, to with space 8:1:1

V8 Nodejs

  • v8 is using generation GC as well
  • the difference is young generation is small
  • young generation only contains 2 spaces: from and to
  • there is no metaspace


  • session (live time) and the reference count


  • reference count
  • 3 generations

Leave a Reply

Your email address will not be published. Required fields are marked *