Motorola Solutions interview question

How is memory allocated?