Jump to content

Code segment

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 85.64.74.158 (talk) at 21:43, 28 November 2009 (Undid revision 326281018 by 121.97.128.19 (talk)). 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