How do you manage dynamic memory allocation in resource-constrained systems, and what are the risks of memory fragmentation?