# 記憶體空間 - stack vs heap ###### tags: `作業系統` * ## stack * 使用方式先進後出,從高位到低位,通常用在call function前,會先把原本的記憶體位址存起來,等call完要回來的時候就在從此位置開始. * ## heap * 用在不知道記憶體何時會被回收的時段,ex:用在malloc,可以自己決定要何時回收記憶體(用free())
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up