encyclopegia.org

Code segment

and heap sections. 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.

and heap sections.]] 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. ==Segment== 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.

References

No reference rows published for this article.

Cite this article

MLA

"Code segment." encyclopegia.org, 2024, https://encyclopegia.org/wiki/code-segment. Accessed 23 November 2026.

Chicago

"Code segment." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/code-segment.

APA

encyclopegia.org. (2024). Code segment. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/code-segment

Accessed November 23, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Battersea Dogs & Cats Home

enwiki · references available

List of MLS drafts

enwiki · references available

Mark Baker (Australian politician)

enwiki · references available

María Martha Serra Lima

enwiki · references available

Grattan massacre

enwiki · references available

Hokitika

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1254530560 · 0.5 · snapshot enwiki-001254530560

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.