Jump to content

Code segment

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Topbanana (talk | contribs) at 14:19, 12 September 2009 (Rm copyvio text, from "The Concepts of Programming Languages" by Robert Sebesta). 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 a phrase used to refer to a portion of memory or of an object file that 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. Read-only code is reentrant if it can be executed by more than one process at the same time.

As a memory region, a code segment resides in the lower parts of memory or at its very bottom, in order to prevent heap and stack overflows from overwriting it.

See also