简体   繁体   中英

Memory Segments in C — Text Segment

有人可以告诉我C语言中的“文本段”是什么,如果可以的话,请给我看一个简单的示例?

The 'text' segment of a program on Unix systems is the code — the machine code, the functions that make up the program (including, in particular, main() if the program is written in C or C++). It can also include read-only data. The other segments in a classic program are the 'data' segment and the 'bss' segment. The 'data' segment holds initialized data; the 'bss' segment holds zeroed data. Once running, the data and bss segments are indistinguishable.

You also end up with the stack and 'the heap'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM