How to allocate program memory in CentOS
How to allocate program memory in CentOS? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
[cpp] view plaincopy views the code chip derived to my code chip # include # include int main () {printf ("% d\ n", getpid ()) on CODE; while (1);}
Running result:
At this time, open another terminal, type cat / proc/10073/maps, and the following display appears:
[cpp] view plaincopy views the code chip derived from my code chip on CODE 08048000-08049000 r-xp 00000000 fd:01 14844 / home/Alex/DaNei/Interview/a.out 08049000-0804a000 Rafael p 00000000 fd:01 14844 / home/Alex/DaNei/Interview/a.out 0804a000-0804b000 rw-p 00001000 fd:01 14844 / home/Alex/DaNei/Interview/a.out 4427b000-4429a000 r-xp 00000000 fd:01 3917 / usr/lib/ld -2.17.so 4429a000-4429b000 Rmurmurp 0001e000 fd:01 393917 / usr/lib/ld-2.17.so 4429b000-4429c000 rw-p 0001f000 fd:01 393917 / usr/lib/ld-2.17.so 442a3000-4445b000 r-xp 00000000 fd:01 393918 / usr/lib/libc-2.17.so 4445b000-4445c000-p 001b8000 fd:01 393918 / usr/lib/libc-2.17.so 4445c000-4445e000 Rmuri p 001b8000 fd:01 393918 / usr/lib/libc-2.17.so 4445e000-4445f000 rw-p 001ba000 fd:01 393918 / usr/lib/libc-2.17.so 4445f000-44462000 rw-p 00000000 00:00 0 b7752000-b7753000 rw-p 00000000 00:00 0 b7769000-b776b000 rw-p 00000000 00:00 0 b776b000-b776c000 r-xp 00000000 00:00 0 [vdso] bfe13000-bfe34000 rw-p 00000000 00:00 0 [stack] finish reading the above Do you know how to allocate program memory in CentOS? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!