The key difference between static and dynamic memory allocation is that in static memory allocation once the memory is allocated, the memory size is fixed while in dynamic memory allocation, once the memory is allocated, the memory size can be changed .