Describe the process of dynamic memory allocation in embedded environments. What are the risks of heap fragmentation, and how do you mitigate them?