Java ProcessBuilder内存 [英] Java ProcessBuilder memory
问题描述
我想知道是否有人确定ProcessBuilder/Runtime.exec()是否在JVM内存空间内执行,或者它是否使用完全独立的系统内存并以某种方式将输出发送到Java.我找不到有关此主题的任何文档.
由于安全问题和能够读取输出,我认为它是前者,但我想绝对确定.
新进程在启动它的Java进程之外运行. 进程管理的一部分,由操作系统管理对新进程的内存分配. >
Java类ProcessBuilder
在Java进程内部运行,该类提供了用于启动新进程并与新进程进行通信的接口.
I was wondering if anybody knew with any certainty whether ProcessBuilder/Runtime.exec() executes inside the space of the JVM's memory or whether it uses completely separate system memory and somehow sends the output to Java. I could not find any documentation on the subject.
I assume it is the former due to security issues and being able to read output, but I would like to make absolutely sure.
The new process runs outside the Java process that started it. Allocation of memory to the new process is managed by the operating system, as part of process management.
The Java class ProcessBuilder
, which provides an interface for starting and communicating with the new process, runs inside the Java process.
这篇关于Java ProcessBuilder内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!