Static memory allocation ek
programming concept hai jahan pe
memory ko program ke compile-time
mein allocate kiya jata hai. Isme
memory ka size aur location code
likhne ke samay fix hota hai aur woh
allocation program ke runtime mein
change nahi hota.
Zarur! Static memory allocation ek
tarike hai jisse programming jaise C
or C++, memory ko manage karte hain.
Isme, jab aap program likhte hain, aap
memory ka ek hissa allocate karte
hain jo program ke execution ke liye
reserved hota hai. Is allocation ka size
aur location program ke likhne ke
samay fix hota hai, aur woh allocation
program ke runtime mein change
nahi hota.
Is tarike se memory allocation karne
ke fayde hote hain ki aapko program
ke execution mein flexibility milti hai,
kyun ki memory allocation ek baar ho
gaya toh usmein runtime mein koi
changes nahi hote. Lekin iska
downside yeh hai ki aapko memory
ka
size pehle se decide karna padta hai,
aur kabhi-kabhi ye inefficient ho
sakta
hai agar aapka program dynamic data
handle karta hai jiska size pehle se
predict nahi ho sakta.
Overall, static memory allocation ka use tab kiya jata hai jab aapko program ka memory usage pehle se pata ho aur aapko memory management control chahiye execution time mein.
Send a
1 Comments
Good 😊
ReplyDelete