강의

멘토링

커뮤니티

Inflearn Community Q&A

baljang1058's profile image
baljang1058

asked

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

Stack memory

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

Resolved

Written on

·

176

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

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

baljang1058's profile image
baljang1058

asked

Ask a question