Hi,
The default implementation of malloc()/free() that comes with GCC starts the heap immediately after the end of the data segment and extends it dynamically until it intersects with the stack pointer at the moment of the extension.
If you want to set the explicit heap limit, you can do this by providing your own implementation to the _sbrk() function that will stop growing the heap once it reaches the given address. Let us know if you need more details.