Jump to content

Code segment

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ClueBot NG (talk | contribs) at 02:57, 29 January 2012 (Reverting possible vandalism by 180.191.158.24 to version by Jfmantis. False positive? Report it. Thanks, ClueBot NG. (845179) (Bot)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, a code segment, also known as a text segment or simply as text, is one of the sections of a program in an object file or in memory, which contains executable instructions.

It has a fixed size and is usually read-only. If the text section 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, a code segment may be placed below the heap or stack in order to prevent heap and stack overflows from overwriting it.

See also