由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - How to know the memory location for C functions?
相关主题
怎样创造一个 segv (转载)./test input and ./test < input
printf 到底怎么打double? %lf or %f?缅怀油泥渴死之父的过世 发包子
这个算是Ubuntu 9.04里GCC 4.3.3的bug么?substring 的问题
看看这个 C 代码cygwin里如何用2>&1
数据出力怎么version control?请教一个打印列的问题
谁会c啊,能不能看看这个代码有啥问题?Let a non-root user turn off computer
sqlquery里的值,如何赋值给外面的linux变量?ubuntu9.0没有声音的问题有解决方法了吗?
再问个fork的题请教一个病毒的问题
相关话题的讨论汇总
话题: foo话题: memory话题: know话题: functions话题: location
进入Linux版参与讨论
1 (共1页)
f******e
发帖数: 582
1
Suppose I have the following C program under Linux. When I run the program,
how should I know where the function main() and Foo() are loaded in the
physical memory?
int main()
{
Foo();
exit(0);
}
Foo()
{
printf(“hello world\n”);
}
G*****h
发帖数: 33134
2
&main
&Foo
but it's only virtual address.
need high privilege to translate to physical address.

,

【在 f******e 的大作中提到】
: Suppose I have the following C program under Linux. When I run the program,
: how should I know where the function main() and Foo() are loaded in the
: physical memory?
: int main()
: {
: Foo();
: exit(0);
: }
: Foo()
: {

f******e
发帖数: 582
3
Thanks for your reply.
Could you have more details how to have "high privilege to translate to
physical address."?
Thanks again.
G*****h
发帖数: 33134
4
google.. usually user mode app does not need to know physical address.
drivers will do that kind of work.

【在 f******e 的大作中提到】
: Thanks for your reply.
: Could you have more details how to have "high privilege to translate to
: physical address."?
: Thanks again.

1 (共1页)
进入Linux版参与讨论
相关主题
请教一个病毒的问题数据出力怎么version control?
一直没有搞定pps谁会c啊,能不能看看这个代码有啥问题?
VBox下Ubuntu窗口调节-安装VBoxAddtions遇到问题sqlquery里的值,如何赋值给外面的linux变量?
google chrome for IE再问个fork的题
怎样创造一个 segv (转载)./test input and ./test < input
printf 到底怎么打double? %lf or %f?缅怀油泥渴死之父的过世 发包子
这个算是Ubuntu 9.04里GCC 4.3.3的bug么?substring 的问题
看看这个 C 代码cygwin里如何用2>&1
相关话题的讨论汇总
话题: foo话题: memory话题: know话题: functions话题: location