On Linux you can open file /proc/self/maps,for example with fopen, and read it until you find linelike this:
0060f000-00630000 rw-p 00000000 00:00 0 [heap]
0060f000-00630000 - address range of heap