인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

baljang's profile image
baljang

asked

[MMORPG Game Development Series with C++ and Unreal] Part 1: Introduction to C++ Programming

Stack memory

push 할 때마다 왜 주소 감소폭이 다른가요?

Resolved

Written on

·

162

1

push 1 할 때는 주소가 0x60fe38에서 0x60fe30로 8감소 했는데 push 2 할 때는 주소 값이 왜 0x60fe22가 아니라 0x60fe28로 2밖에 감소 하지 않는 건가요? 균일하게 8씩 감소해야 하는거 아닌가요? 

C++

Answer 1

2

rookiss님의 프로필 이미지
rookiss
Instructor

네 균일하게 8 감소하는게 맞습니다.
0x30 - 0x28 는 십진수로 48 - 40 = 8 입니다.

baljang님의 프로필 이미지
baljang
Questioner

우와 그렇네요! 명쾌한 답변 감사합니다:)

baljang's profile image
baljang

asked

Ask a question