Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have searched the idea of address space that is The set of all legal addresses in memory for a given application. The address space represents the amount of memory available to a program. I am unable to find that how this concept is implemented? And how it works with operating system? Any help would be appreciated.

share|improve this question
    
this topic is more about how operating system allocates memory to the application. maybe u better post it in SE ? –  Yusubov Oct 5 '12 at 18:14

1 Answer 1

up vote 1 down vote accepted

An address can be represented by a non-negative integer number, so "address space" is a fancy way to describe a set of non-negative integers such that each integer represents a valid address in the memory available to your program.

In some cases, several address spaces can be available to your program: for example, when you are on a system that follows a Harvard architecture, your program has two address spaces - one for the code, and one for the data. In cases like that a non-negative integer is no longer sufficient to uniquely define a location in memory; you must also specify to which of the two address spaces that integer belongs.

The implementation of an address space is done in hardware: a number is mapped to a location in memory by dedicated piece of electronics that controls the interface between the CPU and the memory. Operating systems control this hardware by allocating blocks of physical memory to a running program's virtual address space.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.