Android - Java Stack vs Native Stack

匆匆过客 提交于 2019-12-06 09:28:45

A reasonable implementation of the execution stack mixes Java and native frames in a single stack. That is, if a Java method calls a native function, which calls a Java method, the frames corresponding to the calls are all pushed on the same stack.

In general terms, the native heap is a storage area that is used for dynamically allocated memory. The Java heap is an area within the native heap reserved for Java objects, and its contents are managed by the garbage collector. Depending on the garbage collector implementation, Java heap may be contiguous or it could be split into separate areas.

I'm not familiar with the specifics of Dalvik or ART, but they are probably like other JVMs in this respect.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!