When I print the contents of the running process, I got result like this
00400000-00401000 r-xp 00000000 08:01 137910 /home/user/process/a.out 00600000-00601000 rw-p 00000000 08:01 137910 /home/user/process/a.out 02434000-02455000 rw-p 00000000 00:00 0 [heap] Why the a.out is loaded at two memory regions? Is it the same part or different parts. One has got r-xp and other has got rw-p. Eventhough I have allocated a size of integer using malloc in the program, the size of the heap is shown more than that. Why is it so?