어수선한 다람쥐 창고

  • 홈
  • 태그
  • 방명록

memory access 1

Object가 8바이트인 이유? Wrapper Class가 16바이트인 이유?

Object : 8바이트 = 레퍼런스 주소(4바이트) + GC 카운팅(1바이트) + 락(1바이트) + 해시(2바이트) Integer = Object(8) + int(4) + 의미없는 패딩값(4) 객체들은 8바이트 단위로 이루어져 있다. (8, 16, 32, 64) 그 이유는 비트연산을 통해 빠르게 memory access를 하기 위함이다. 비트연산 >> 세번하면 x8이 된다. 8에 안맞추면 매번 memory access 시 더하기 연산을 추가로 해주어야하기 때문에 느려진다. https://stackoverflow.com/questions/11926415/why-do-java-objects-have-to-be-a-multiple-of-8

software engineering/web 2019.08.14
1
더보기
프로필사진

도토리 줍는 중

  • 전체 (38)
    • today I thought (3)
    • software engineering (33)
      • ready queue (0)
      • introduction (0)
      • web (20)
      • network (1)
      • os (0)
      • database (4)
      • devops (5)
      • design pattern (0)
      • etc (3)
    • inspiration (2)
      • lesson (1)
      • activity (0)
      • art (0)
      • reading (1)

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Archives

Tag

REACT_APP_, A component is changing a controlled input of type text to be uncontrolled., react.js, JavaScript, query, 애플❤️, AOP, JPA, View 생성 쿼리, maven, 스프링 만세, ERROR: Maven JVM terminated unexpectedly with exit code 137, ERR_UPLOAD_FILE_CHANGED, 안드로이드 왕초보, Spring, Java, PostgreSQL, 리액트, 쿼리 검색, 파괴적인 명령어,

Copyright © Kakao Corp. All rights reserved.

티스토리툴바