addresses

M

Morris Dovey

Bill said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?

A pointer is as close as you'll get. For machines with a linear
address space, the pointer will probably be the memory address -
but for other architectures (and perhaps some virtual machines)
the pointer may very not be a unique address.
 
B

Bill Cunningham

Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?

Bill
 
I

Ian Collins

Bill said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?
C has no such concept. The best you can do is take the address of a
variable and use that address within the context of the application.
That address may or may not map directly to a physical address.

One any virtual memory operating system, obtaining a physical address
from a virtual address is beyond the scope of standard C.
 
K

Kaz Kylheku

    Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for  an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?

When you become qualified to work with this type of information, you
will distinguish yourself by knowing where to begin looking for it.
 
B

Bill Cunningham

C has no such concept. The best you can do is take the address of a
variable and use that address within the context of the application.
That address may or may not map directly to a physical address.

One any virtual memory operating system, obtaining a physical address
from a virtual address is beyond the scope of standard C.

Perhaps what I'm thinking of is a kernel function and the kernel mapping
virtual addresses to physical.
What I'm looking for is probably a probably a return of a virtual
address in hex.

Bill
 
B

Bill Cunningham

A pointer is as close as you'll get. For machines with a linear
address space, the pointer will probably be the memory address -
but for other architectures (and perhaps some virtual machines)
the pointer may very not be a unique address.
How would you use a pointer?

Bill
 
I

Ian Collins

Bill said:
Perhaps what I'm thinking of is a kernel function and the kernel mapping
virtual addresses to physical.

That would be very platform specific.
What I'm looking for is probably a probably a return of a virtual
address in hex.
I'm not sure you are sure what you are looking for! Why do you want to
know a physical address? Only a device driver would care. If you want
to print something in hex, use the printf %x specifier.
 
S

santosh

Bill said:
Perhaps what I'm thinking of is a kernel function and the kernel
mapping
virtual addresses to physical.
What I'm looking for is probably a probably a return of a virtual
address in hex.

C has no concept of "kernel function", "kernel mapping", "virtual
address" etc.

There may or may not be a kernel present. The machine may or may not use
virtual memory. These details are implementation dependant. See the
documentation for your processor and operating system. Since you are
using Windows the online MSDN documentation will help you.
 
K

Kaz Kylheku

    Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for  an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?

This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.
 
D

Default User

Kaz said:
    Are there any functions in c like memcpy perhaps that can
return the memory address from the address bus for  an array of say
char name[5] ? This would be 40 bits somewhere. Where in memory?

This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.


I can't tell. I do know that he ignores all advice. I'm plonking him.




Brian
 
M

Mark McIntyre

Kaz said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5] ? This
would be 40 bits somewhere. Where in memory?

This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.

Apparently he has learning difficulties.
 
P

pete

Kaz Kylheku wrote:
This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.

He's a very sophisticated troll.
He's on topic.
He addresses the technical content of posted replies.
But it's his complete lack of arrogance
that fools most people into thinking that he's legitimate.
And he's consistent about all of that too.
 
B

Bill Cunningham

santosh said:
int i, *p = &i;
*p = 5;

Why don't you go through a tutorial?

I see what you're doing here. But I don't think it's what I'm looking
for.
 
B

Bill Cunningham

Ian Collins said:
Bill said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5] ?
This
would be 40 bits somewhere. Where in memory?
C has no such concept. The best you can do is take the address of a
variable and use that address within the context of the application.
That address may or may not map directly to a physical address.

One any virtual memory operating system, obtaining a physical address
from a virtual address is beyond the scope of standard C.

It looks that way.
 
J

Joe Wright

Mark said:
Kaz said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5]
? This
would be 40 bits somewhere. Where in memory?

This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.

Apparently he has learning difficulties.

Yes he does. He is seriously challenged. Some time ago he explained some
of his difficulties, mainly to do with memory.

I am convinced that Bill is not a troll and is using C and Usenet as
part of his therapy.

We should help him as much as we can, and not be offended if our advice
doesn't "take".
 
B

Bill Cunningham

One any virtual memory operating system, obtaining a physical address
from a virtual address is beyond the scope of standard C.
Ok all I need to know.

Bill
 
B

Bart

    Ok all I need to know.

I doubt the physical address would be very useful to you. For one
thing, the physical memory of your task may not be contiguous. And I
think it's likely to keep changing anyway.
 
R

Randy Howard

Mark said:
Kaz said:
Are there any functions in c like memcpy perhaps that can return the
memory address from the address bus for an array of say char name[5]
? This
would be 40 bits somewhere. Where in memory?

This "Bill Cunningham" Usenet identity is a troll. You can tell from
this thread alone, but a quick peek at the posting history pretty much
confirms it.

Apparently he has learning difficulties.

Yes he does. He is seriously challenged. Some time ago he explained some
of his difficulties, mainly to do with memory.

I am convinced that Bill is not a troll and is using C and Usenet as
part of his therapy.

We should help him as much as we can, and not be offended if our advice
doesn't "take".

It could also be that he has discovered that relying on political
correctness to override common sense is a proven tactic.
 
S

Serve Laurijssen

pete said:
He's a very sophisticated troll.
He's on topic.
He addresses the technical content of posted replies.
But it's his complete lack of arrogance
that fools most people into thinking that he's legitimate.
And he's consistent about all of that too.

Yeah Billy is cool :))
A big smile comes on my face when I see a thread made by Bill. Thanks! <3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top