Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

메모리 구조의 순서 #7

Open
yeonjaee opened this issue Jun 24, 2023 · 2 comments
Open

메모리 구조의 순서 #7

yeonjaee opened this issue Jun 24, 2023 · 2 comments

Comments

@yeonjaee
Copy link
Owner

No description provided.

@yeonjaee
Copy link
Owner Author

CPU에 가까운 순서로.

레지스터: CPU 내부에 존재하며 가장 빠르게 액세스 가능한 메모리. 매우 제한적이지만, 현재 실행 중인 명령어나 즉시 필요한 데이터를 저장하는 데 사용된다.

캐시 메모리: 캐시 메모리는 CPU 내부나 근처에 있으며, 레지스터보다는 크지만 여전히 속도가 빠르다. L1, L2, L3와 같이 여러 레벨의 캐시가 있을 수 있으며, L1은 CPU에 가장 가깝고 L3는 가장 멀리 떨어져 있다.

메인 메모리 (RAM): 캐시보다는 느리지만 훨씬 더 많은 데이터를 저장할 수 있다. RAM은 현재 실행 중인 프로그램과 그 데이터를 저장하는 데 사용된다.

보조 저장소: 하드 드라이브나 SSD와 같은 장치를 포함하며, 메인 메모리보다 더 많은 데이터를 저장할 수 있지만 속도는 훨씬 느리다. 프로그램 파일, 사용자 문서 등을 영구적으로 저장하는 데 사용된다.

@yeonjaee
Copy link
Owner Author

+) 메모리 구조는 Code, Data, Heap, Stack으로 Code에는 소스코드, Data에는 전역 변수, Heap에는 참조 타입 값, Stack에는 함수의 지역변수, 반환값 등이 저장된다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant