Cortex-M3 dynamic memory

Added changes required for dynamic memory management.
Fixed some comments.