Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Memory address
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Contents of each memory location== {{see also|binary data}} Each memory location in a [[stored-program computer]] holds a [[binary number]] or [[decimal number]] ''of some sort''. Its interpretation, as data of some [[data type]] or as an instruction, and use are determined by the [[instruction (computer science)|instructions]] which retrieve and manipulate it. Some early programmers combined instructions and data in words as a way to save memory, when it was expensive: The [[Manchester Mark 1]] had space in its 40-bit words to store little bits of data β its processor ignored a small section in the middle of a word β and that was often exploited as extra data storage.{{citation needed|date=October 2011}} [[Self-replicating]] programs such as [[Computer virus|viruses]] treat themselves sometimes as data and sometimes as instructions. [[Self-modifying code]] is generally [[deprecated]] nowadays, as it makes testing and maintenance disproportionally difficult to the saving of a few bytes, and can also give incorrect results because of the compiler or processor's assumptions about the machine's [[State (computer science)|state]], but is still sometimes used deliberately, with great care. ===Address space in application programming=== In modern [[computer multitasking|multitasking]] environment, an [[application program|application]] [[process (computing)|process]] usually has in its address space (or spaces) chunks of memory of following types: * '''[[Machine code]]''', including: ** program's own code (historically known as ''[[code segment]]'' or ''text segment''); ** [[shared libraries]]. * '''[[Data (computing)|Data]]''', including: ** initialized data ([[data segment]]); ** [[.bss|uninitialized (but allocated)]] variables; ** [[run-time stack]]; ** [[heap (programming)|heap]]; ** [[Shared memory (interprocess communication)|shared memory]] and [[memory mapped file]]s. Some parts of address space may be not mapped at all. Some systems have a "split" [[memory architecture]] where machine code, constants, and data are in different locations, and may have different address sizes. For example, [[PIC18]] microcontrollers have a 21-bit program counter to address machine code and constants in Flash memory, and 12-bit address registers to address data in SRAM.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)