LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2005, 08:40 AM   #1
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Rep: Reputation: 16
addresse outside memory


hi,

if a pointer is initialized with an address which actually falls after the last address in the logical memory , that we call as an invalid address or illegal address.
and whats the difference between the two?
 
Old 03-15-2005, 08:43 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
Hmm
i guess what you are referring is that you have an address not belonging to the Virtual address space of your process.
I guess they both refer to the same thing.
 
Old 03-15-2005, 11:59 PM   #3
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
thanks ,but ,

i m not pretty much sure whether they r same or not!

When u have an address which actually doesn't exists at all,

(may be b'coz u r addressing an address out of the range of

physical memory, any absurd address) Will that cause a page

fault or an ILLEGAL address error?

i m talking about the case when the mapping of this virtual address may lead u to any astronomical ! non existent address
i.e out of the rang of our whole computer memory,
which is, of course, not present at all .Isn't that address ILLEGAL.

but an invalid address is simply what u find as its entry in the page table marked as INVALID. i.e 'I'. meaning u r not authorized to access that page or simply the page needs to be mapped and swapped in.
 
Old 03-16-2005, 01:26 AM   #4
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
I guess you are talking from an Application level.
So when you access a address you basically provide the virtual address.
say you are trying to read from a virtual address. now when the processor sees this it will try to find out the physical address from this virtual address. It does this basically by reading from the page table entries. if the translation cannot be found then it will cause a page fault. The kernel will find out the application which causes the same and deliver a signal (SIGSEGV)
In windows environment I think this is called illegal address fault or something like that.

Now you were asking about what if the translation was not proper ie the physical address we get from the translation is not correct and does not lie in a valid physical memory range.
The kernel is the guy who sets up the translation and if this happens then it means something is terribily wrong with the kernel.
how the cases are handled , when they occur, by each architecture is dependent on the architecture. Some archs have a special exception condition raised and delivered to the processor (for ex MCA on Itanium).
The invalid bit for page table just says that the translation is invalid. Thats all.
 
Old 03-16-2005, 04:14 AM   #5
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
ur answer was well understood , thanx for the details.

what i exactly intended to know was something related to vxWorks, as it gives u an error related to illegal address, specifically.And if u access any invalid address then it may issue a page fault, thus distinguishing the two cases.
Well, it could be that , its applying its own terminology!

Last edited by kapsikum; 03-16-2005 at 04:15 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
Wireless network, Suse 10, Not getting IP addresse TroelsSmit Linux - Newbie 8 11-24-2005 07:48 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration