由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 怎么返回一个变量的地址?
相关主题
啥时候java也可以compile成为native的?NoClassDefFoundError
Re: 问一个关于Java Native Interface的问题sigh, Java needs arraycopy for imaging
Android C/C++ native calls Java APIs迷惑了很久,java 和 c++ 到底谁快?
C++ JNI code to invoke native method – header an (转载)请教大牛:java可以做这件事情吗
Re: JAVA中测时间的方法?Java会产生更多的page fault导致速度变慢
java可以调用dll吗?你们谁去劝一下goodbug要点脸?
请教若干问题使用JAVA的一则经验和教训
help!!一个关于事件的问题
相关话题的讨论汇总
话题: stack话题: java话题: native话题: calling话题: 地址
进入Java版参与讨论
1 (共1页)
c*m
发帖数: 836
1
前两天看到一个面试题,怎么确定stack grow的方向,是从高地址到低地址,还是相反
。这个问题用C很容易,写两个nested function call, 在每个里面分配一个变量,然
后检查指针就行了。Java 有什么办法呢?
m******t
发帖数: 2416
2
Are you sure it was an interview for a Java job?
c*m
发帖数: 836
3
I read it sometime ago on internet, and the question says, 'using java or c+
+', this really got me
m******t
发帖数: 2416
4
Don't know how to do this in Java - calling a JNI function from two nested
Java methods? What's the point anyway?
c*****t
发帖数: 1879
5
The interpreter stack is different from the native method stack.
The interpreter stack (1) can be allocated on heaps, may be expandable,
and need not to be contiguous.
The native method stack (2) is a C calling stack, not expandable.
So using JNI would only provide you C-calling stack information.
However, maybe you could inspect the VM to generate the necessary
information for stack. Throwable.fillStackTrace() (spelling?) is
a native function call. If you have the source code of that piece
of

【在 m******t 的大作中提到】
: Don't know how to do this in Java - calling a JNI function from two nested
: Java methods? What's the point anyway?

1 (共1页)
进入Java版参与讨论
相关主题
一个关于事件的问题Re: JAVA中测时间的方法?
java的接口runnablejava可以调用dll吗?
怎样让java 程序运行快?请教若干问题
一个event model的概念级的问题help!!
啥时候java也可以compile成为native的?NoClassDefFoundError
Re: 问一个关于Java Native Interface的问题sigh, Java needs arraycopy for imaging
Android C/C++ native calls Java APIs迷惑了很久,java 和 c++ 到底谁快?
C++ JNI code to invoke native method – header an (转载)请教大牛:java可以做这件事情吗
相关话题的讨论汇总
话题: stack话题: java话题: native话题: calling话题: 地址