Process Memory layout (x86 schema)
--------------------------------------------------------------------------
0x08048000 Code. Text, codes, read-only
Data, whichcontains the already initialized, read-only
BSS. BSS, uninitialized data, initialized to 0, read / write
... Heap area, dynamically allocating acquired memory from . BSS to high-end memory growth
... (heap) , read / write
...
Stack stack area, starting address greater than 0xbfff0000
Arguments the formal parameters of main ()
Environment environment variable area
Program name Execve () first parameter, not argv[0]
0xBFFFFFFC Null (DWORD) The last four bytes are fixed to zero
0xC0000000
--------------------------------------------------------------------------
Of course, it also involves loading some dynamic libraries, either in the heap area or before the heap,
x86 is before the heap (that is, before 0x08048000), but if the dynamic library is too large, it is loaded into the heap, and arm is in the heap.
C Program memory allocation