1. < Te r m P r o j e c t : S u r v e y o n P r o g r a m m i n g P a r a d i g m s >
JVM의 메모리 관리
과목명: 프로그래밍언어
소속: IT대학 컴퓨터학부
제출일: 2019.05.16
학번: 20142377
이름: 심승철
19. this (class JVM instance의)
Int a
char b
long c
float d
Object e
double f
String g
byte h
short I
boolean j
2
Method의Parametervariable과LocalVariable
인덱스를가진배열
char,byte,short,boolean int형으로할당된다 long,double 두개의배열공간을
0번인덱스는 Class의Instance데이터를
primitiveType인경우LVS에고정된크기로할당되지만 Object나Array,String과같은객체는heap에저장되기
reference
primitiveType이성능적으로이점이
그림 출처: https://slideplayer.com/slide/10540943/
class Jvm{
public int jvmMethod(int a,, char b long c,
float d, object e, double f, String g, byte h,
short i, boolean j){
return 0;
}
}
0(인덱스) reference(값)
1 int
2 int
3 long
5 float
6 reference
7 double
9 reference
10 int
11 int
12 int
Heap
jvmMethod파라미터의LocalVariableSection
20. 2
- JVM의작업공간이다
그림 출처: https://slideplayer.com/slide/10540943/ 그림 출처: http://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html
36. 3
# Java 7 이전 JVM에서는 server vm일 경우 default로 10000번 이상 interpreted 할 경우 JIT Compiler를 사용하고,
client vm일 경우 default로 1000번 이상 interpreted 할 경우 JIT Compiler를 사용한다.
# Java 8 이후 JVM에서는 server vm일 경우 defaul로 10000번 이상 interpreted 할 경우 JIT Compiler를 사용하고,
client vm일 경우 defaul로 1500번 이상 interpreted 할 경우 JIT Compiler를 사용한다.
37. 3
장점: 개발자들로 하여금 Memory 관련 문제에서 큰 고민을 하지 않게 해주었다.
프로그램 구동 시 예기치 않은 Memory Corruption이 발생하는 위험성을 줄여준다.
단점: Garbage Collection이 작동하는 동안 프로그램을 수행하는 과정이 멈춘다.
CPU의 사용에 민감한 프로그램의 경우 CPU Time 스케줄링에 어려움을 주기도 한다.
42. 4
자바의바이트코드(.class파일) .dex로컴파일
레지스터기반
레지스터기반
실행시간이더짧기
그림 출처: http://bitly.kr/kSZN2S
그림 출처: https://www.slideshare.net/ShivamSharma490/dvm-91069091
https://www.usenix.org/legacy/events/vee05/full_papers/p153-yunhe.pdf
43. 4
4.4 킷켓에 추가, 5.0 롤리팝에 달빅 폐지
Ahead-Of-Time
CPU소모가적다
그림 출처: http://bitly.kr/kSZN2S
45. 5
WORA(WriteOnce,RunAnywhere)
안드로이드라는 플랫폼은 다양한 스마트폰 디바이스에서 사용된다. 이때 하드웨어, 플랫폼에 구애 받지
않고 어디서든 동작할 수 있는 자바라는 언어는 굉장히 매력적으로 보였을 것이다.
추후 기술선택을 하게 된다면 해당 언어의 철학을 살펴보고, 그 관련 기술을 살펴본다면 도움이 될 것이라
생각한다.