开发者

is memory allocated in JNA (or JNI) by the C code limited by jvm (param -Xmx or architecture 32/64)

that is, could a malloc() asking for 5开发者_如何学JAVA mb in the C part fail due to:

  • jvm was run with -Xmx32m and jvm heap is already 30 mb
  • something to do with jvm being 32 bits in a 64 bits windows


The answer to the the first bullet is "no" - Xmx refers to the Java heap and any native allocations are completely separate.

The answer to the second bullet is "yes" - native allocations are subject to the general process allocation restrictions inherent in the O/S and/or hardware.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜