StrukturData 06 Memory Allocation
StrukturData 06 Memory Allocation
StrukturData 06 Memory Allocation
Memory Allocation
Tue, Nov 5, 2019
FAKULTAS TEKNOLOGI
INFORMASI
UNIVERSITAS ADVENT INDONESIA
What is Memory Allocation
• Memory allocation is the process of setting aside
sections of memory in a program to be used to store
variables, and instances of structures and classes.
• There are two ways via which memories can be
allocated for storing data:
1. Static allocation
2. Dynamic allocation
int x, y;
float a[5];
free(ptr);