Code segment

In computing, a code segment, also known as a text segment or simply as text, is a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions. The term "segment" comes from the memory segment, which is a historical approach to memory management that has been succeeded by paging. When a program is stored in an object file, the code segment is a part of this file; when the loader places a program into memory so that it may be executed, various memory regions are allocated (in particular, as pages), corresponding to both the segments in the object files and to segments only needed at run time. For example, the code segment of an object file is loaded into a corresponding code segment in memory.

Comment
enIn computing, a code segment, also known as a text segment or simply as text, is a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions. The term "segment" comes from the memory segment, which is a historical approach to memory management that has been succeeded by paging. When a program is stored in an object file, the code segment is a part of this file; when the loader places a program into memory so that it may be executed, various memory regions are allocated (in particular, as pages), corresponding to both the segments in the object files and to segments only needed at run time. For example, the code segment of an object file is loaded into a corresponding code segment in memory.
Has abstract
enIn computing, a code segment, also known as a text segment or simply as text, is a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions. The term "segment" comes from the memory segment, which is a historical approach to memory management that has been succeeded by paging. When a program is stored in an object file, the code segment is a part of this file; when the loader places a program into memory so that it may be executed, various memory regions are allocated (in particular, as pages), corresponding to both the segments in the object files and to segments only needed at run time. For example, the code segment of an object file is loaded into a corresponding code segment in memory. The code segment in memory is typically read-only and has a fixed size, so on embedded systems it can usually be placed in read-only memory (ROM), without the need for loading. If the code segment is not read-only, then the particular architecture allows self-modifying code. Fixed-position or position-independent code may be shared in memory by several processes in segmented or paged memory systems. As a memory region, the code segment may be placed below the heap or stack in order to prevent heap and stack overflows from overwriting it.
Hypernym
Portion
Is primary topic of
Code segment
Label
enCode segment
Link from a Wikipage to another Wikipage
.bss
Category:Executable file formats
Category:Memory management
Computer architecture
Computing
Data segment
Embedded system
Executable
File:Program memory layout.pdf
Heap overflow
Instruction (computer science)
Loader (computing)
Main memory
Memory management
Memory segment
Object file
Paging
Position-independent code
Read-only memory
Segmentation (memory)
Self-modifying code
Stack overflow
Virtual address space
SameAs
4zbLu
Codesegment
Code segment
m.011br9y8
Q836978
Segment de code
Segment kodu
Segmento de código
代码段
Subject
Category:Executable file formats
Category:Memory management
WasDerivedFrom
Code segment?oldid=1095856211&ns=0
WikiPageLength
2956
Wikipage page ID
1067537
Wikipage revision ID
1095856211
WikiPageUsesTemplate
Template:Compu-prog-stub
Template:Portal
Template:Reflist
Template:Short description