Use dynamic memory for Profile key/value pairs.

Use dynamic memory for Profile key/value pairs.