Dab tsi yog hom Java nco?
Dab tsi yog hom Java nco?

Video: Dab tsi yog hom Java nco?

Video: Dab tsi yog hom Java nco?
Video: Yog hmoov dab tsi - Gao Nou Kue ft. Mang Vang (Official Music Video) New song 2020 2024, Kaum ib hlis
Anonim

Cov nco hauv JVM muab faib ua tsib txawv qhov chaw xws li- Method area- Lub cheeb tsam txoj kev khaws cov chav kawm code: code ntawm qhov sib txawv thiab cov txheej txheem. Heap - Ib Java cov khoom raug tsim nyob rau hauv cheeb tsam no. Java Stack- Thaum txoj kev khiav cov txiaj ntsig tau khaws cia hauv pawg nco.

Ua raws li qhov no, muaj pes tsawg hom kev nco muaj nyob hauv JVM?

Cov nco hauv JVM faib ua 5 txawv qhov chaw:

Heap. Pob. Program Counter Register. Native Method Stack.

JVM ua qee yam haujlwm tshwj xeeb:

  • Kev thauj khoom ntawm code.
  • Kev txheeb xyuas cov cai.
  • Kev ua raws cai.
  • Nws muab lub sijhawm ua haujlwm ib puag ncig rau cov neeg siv.

Ib sab saum toj no, lub cim xeeb tseem ceeb hauv Java yog dab tsi? Firstly, los ntawm " lub ntsiab nco "peb txhais tau tias Java heap, raws li pom los ntawm JVM'. JVM feem ntau yog pub dawb los ua haujlwm ntawm cov ntawv luam hauv zos ntawm qhov sib txawv. Piv txwv li, JIT compiler tuaj yeem tsim cov lej uas thauj tus nqi ntawm a Java variable mus rau hauv ib tug register thiab ces ua hauj lwm nyob rau hauv uas register.

Yog li ntawd, hom heap nco yog dab tsi?

3 Teb. Heap yog muab faib rau Young Generation, Old or Tenured Generation, thiab Permanent Generation. Cov Tub Ntxhais Hluas yog qhov chaw uas txhua yam khoom tshiab tau faib thiab hnub nyoog.

JVM yog dab tsi thiab piav qhia kuv txog Java nco faib?

Cov JVM loads cov cai, txheeb xyuas cov cai, executes code, tswj nco (qhov no suav nrog faib kev nco los ntawm kev khiav hauj lwm System (OS), tswj Java faib suav nrog heap compaction thiab tshem tawm cov khoom khib nyiab) thiab thaum kawg muab lub sijhawm ua haujlwm.

Pom zoo: