Jump to content

Code segment: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m add spanish interwiki
redirecting — not a very good topic for a standalone article and unreferenced. until there is a need to split, do not recreate an article here.
Line 1: Line 1:
#REDIRECT [[Memory segmentation]] {{R from subtopic}}
{{Unreferenced|date=May 2009}}

In [[computing]], a '''code segment''', also known as a '''text segment''' or simply as '''text''', is one of the [[Memory segmentation|sections]] of a program in an [[object file]] or in [[computer memory|memory]], which contains [[executable]] [[Instruction (computer science)|instruction]]s.

It has a fixed size and is usually [[read-only]]. If the text section is not read-only, then the particular [[Computer architecture|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 overflow|heap]] and [[stack overflow]]s from overwriting it.

==See also==
*[[data segment]]
*[[.bss]]
*[[Segmentation (memory)]]

==External links==
*[http://blog.ooz.ie/2008/09/0x03-notes-on-assembly-memory-from.html mem_sequence.c - A program that sequentially lists memory regions in itself]

[[Category:Executable file formats]]
[[Category:Memory management]]

{{compu-prog-stub}}

[[es:Segmento de código]]
[[pl:Segment kodu]]
[[zh:代码段]]

Revision as of 04:39, 17 October 2012