hello,
my question is related with the address of a variable in C. suppose if
i am printing the address of a variable, so that address will be
virtual address or physical address. and why it'll be so?
is that has something to do with 16 bit environment and 32 bit
environment?
thanks in advance
sushant 9 3624
sushant <th********@red iffmail.com> scribbled the following: hello,
my question is related with the address of a variable in C. suppose if i am printing the address of a variable, so that address will be virtual address or physical address. and why it'll be so?
is that has something to do with 16 bit environment and 32 bit environment?
It is completely implementation-defined and outside the scope of the C
language standard. As far as the language goes, an address is an address
is an address.
--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"To know me IS to love me."
- JIPsoft
On Thu, 17 Feb 2005 22:21:11 -0800, sushant wrote: hello,
my question is related with the address of a variable in C. suppose if i am printing the address of a variable, so that address will be virtual address or physical address. and why it'll be so?
It will be the address as the C program sees it. In a virtual memory
environmen that is likely to relate to a virtual address.
is that has something to do with 16 bit environment and 32 bit environment?
Not really, no.
Lawrence th********@redi ffmail.com (sushant) wrote:
# hello,
#
# my question is related with the address of a variable in C. suppose if
# i am printing the address of a variable, so that address will be
# virtual address or physical address. and why it'll be so?
From the point of view of your program it doesn't matter if the addresses are
virtual or real; the hardware will handle all of that for you. If your system
does VM correctly the only visible sign could be real time delays between
some memory references due to page faults (or time slicing with other tasks).
--
SM Ryan http://www.rawbw.com/~wyrmwif/
Who's leading this mob? th********@redi ffmail.com (sushant) writes: my question is related with the address of a variable in C. suppose if i am printing the address of a variable, so that address will be virtual address or physical address.
No, not necessarily.
--
int main(void){char p[]="ABCDEFGHIJKLM NOPQRSTUVWXYZab cdefghijklmnopq rstuvwxyz.\
\n",*q="kl BIcNBFr.NKEzjwC IxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+= strchr(p,*q++)-p;if(i>=(int)si zeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
sushant wrote: My question is related with the address of a variable in C.
If \I am print the address of a variable, will that address be a virtual address or physical address?
Physical addresses are only visible in "supervisor " mode.
User application programs almost certainly print virtual addresses.
And why will it be so?
Does it have something to do with 16 bit environment and 32 bit environment?
This is probably a reference
to "real" and "virtual" modes on x86 machines.
The original [16 bit] 8086 didn't implement virtual memory
so user application programs referenced (real) physical addresses.
The [32 bit] 80386 implemented virtual memory
but could be run in "real" mode to support [16 bit] legacy applications.
New [32 bit] applications were designed to run in virtual mode.
In article <cv**********@n ntp1.jpl.nasa.g ov>, E.************* *@jpl.nasa.gov says... sushant wrote:
My question is related with the address of a variable in C.
If \I am print the address of a variable, will that address be a virtual address or physical address?
Physical addresses are only visible in "supervisor " mode. User application programs almost certainly print virtual addresses.
How do I get gcc -Wall -ansi -pedantic to generate code that will
use "supervisor mode" on my Ti MSP430? I checked the C spec
briefly and could not find a reference to "supervisor mode", could
you provide a reference?
--
Randy Howard (2reply remove FOOBAR)
"Making it hard to do stupid things often makes it hard
to do smart ones too." -- Andrew Koenig
Randy Howard wrote: How do I get gcc -Wall -ansi -pedantic to generate code that will use "supervisor mode" on my Ti MSP430? I checked the C spec briefly and could not find a reference to "supervisor mode", could you provide a reference?
I checked the MSP430x2xx Family User's Guide: http://focus.ti.com/mcu/docs/techdoc...6&familyId=342
I don't think that
your machine has memory management or memory protection.
Apparently, it uses passwords to protect certain [flash] memory segments
(from accidental erasure).
It is always in "supervisor mode".
You can't and you don't need to do anything
to put your machine in "supervisor mode".
But, then, you already knew that didn't you?
Try the comp.dsp newsgroup if you need more details.
Randy Howard <ra*********@FO OverizonBAR.net > wrote:
# In article <cv**********@n ntp1.jpl.nasa.g ov>,
# E.************* *@jpl.nasa.gov says...
# > sushant wrote:
# >
# > > My question is related with the address of a variable in C.
# > >
# > > If \I am print the address of a variable,
# > > will that address be a virtual address or physical address?
# >
# > Physical addresses are only visible in "supervisor " mode.
# > User application programs almost certainly print virtual addresses.
#
# How do I get gcc -Wall -ansi -pedantic to generate code that will
I use
cc x.c
--
SM Ryan http://www.rawbw.com/~wyrmwif/
You face forward, or you face the possibility of shock and damage.
Randy Howard wrote: E.************* *@jpl.nasa.gov says... sushant wrote:
My question is related with the address of a variable in C.
If \I am print the address of a variable, will that address be a virtual address or physical address?
Physical addresses are only visible in "supervisor " mode. User application programs almost certainly print virtual addresses.
How do I get gcc -Wall -ansi -pedantic to generate code that will use "supervisor mode" on my Ti MSP430? I checked the C spec briefly and could not find a reference to "supervisor mode", could you provide a reference?
Trolls don't seem to recognize when they are the butt of gibes.
--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
Is it possible to include my remote web server path eg: m:/html/root/site1
| m:/html/root/site2 etc
....in virtual includes....
Thus eliminating the need to create duplicate INC files in each sub-domain
on my remote web server host domain IP. eg: http://72.3.5.6.0
(www.site1.com; www.site2.com)
I would like to be able to use a UNIVERSAL INC file in the root of my web IP
|
by: Krishna Sagiraju |
last post by:
hai,
can we convert virtual address to physical address using c/c++ ?
thanx
Krishna
|
by: And |
last post by:
Hi everyone my database is in a folder inside the inetpub folder
(c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside
the wwwroot folder.
My question is:
Is there a way of accessing my database using virtual directories, that is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".
|
by: david |
last post by:
I basically use the following code to display the directory and file names in
the WWWROOT, but can not show the virtual directory.
----
Dim path As String = Server.MapPath(x)
Dim di As DirectoryInfo = New DirectoryInfo(path)
Listing.DataSource = di.GetFileSystemInfos()
Listing.DataBind()
----
Anyone can help me about how to list the virtual directory.
|
by: B Letts |
last post by:
Hi -
I'm currently using the FileUpload control to allow people to upload
files to my website. This all works fine, as long as I'm going to a
physical path on my server.
However, I need to allow people to upload to a virtual directory. The
directory may or may not exist on the same server as the Web site.
I can't seem to figure out how to do this. If I pass the virtual
| |
by: Dhruba Bandopadhyay |
last post by:
In classic ASP I could write:
<!-- #INCLUDE VIRTUAL="Kevin\General\ServiceClass.asp" -->
and it would "include" that ASP file into the current ASP file. My web
application folder was not stored in C:\Inetpub\wwwroot\ but somewhere else.
But the VIRTUAL command let IIS locate files by the IIS virtual folder.
Now in ASP.NET this does not work. It complains saying:
|
by: Lorenzo |
last post by:
Hello,
I have a web application with a virtual directory in it. With 'virtual
directory' i mean
a folder whose physical path is different from the physical path of the
application, but in which Web Sharing is active.
For example:
my application is in "C:\Inetpub\wwwroot\MyApp",
the Virtual folder is in "C:\VirtualFolder",
and IIS sees it as if it were in "C:\Inetpub\wwwroot\MyApp\VirtualFolder".
|
by: =?Utf-8?B?QiBTaW5naA==?= |
last post by:
Hi
Scenario
1) Host - XP Laptop with internet connection using Sky Broadband Wireless
Router Netgear DG834GT
2) MS Virtual Server 2005 - I have deployed an XP MS Virtual Server 2005 to
act as a virtual machine
|
by: Paul F |
last post by:
Im confused about the difference(s) between virtual directories and
physical
directories in IIS.
Any ideas?
*** Sent via Developersdex http://www.developersdex.com ***
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |