executing Java written code from C pgm
Dmitry Samersoff
dsamersoff at gmail.com
Thu Jan 22 11:17:23 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matthias,
1. Regardless to number of running processes they all share the same
DSO so process size is not an issue.
But each java process require a Java and C heap, so if you plan to run
many processes in low-resource environment you should tune JVM options
to achieve better result.
2. You might consider to rewrite you business logic to spawn a new
java thread instead of new process.
- -Dmitry
On 2015-01-22 13:26, Matthias Apitz wrote:
>
> Hello,
>
> I have some C/C++ written servers and want to use code (classes)
> written in Java. I figured out how the load the JVM and to
> reference into the class as C function calls. I can post the
> details if someone is interested it this.
>
> The problem is that the a.out must be linked against the JVM
> (libjvm.so) and the resulting process is around 300 MByte (text,
> data and bss), which makes it unusable in production (where some
> 200-300 processes of this are running).
>
> Is there some way to compile the Java code to machine code with
> needing a JVM to execute this?
>
> Thanks in advance
>
> matthias
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBAgAGBQJUwNw/AAoJEHEy08c4gIABkt4H/iYhVQQzmIWnA4g6K5NEvubw
+BNYnaoNzRz2GHFT6q4H+EO3vamyDYxHSNKIsIkZoXbkcp8mAslujQtp+7Zo9vB7
rKU5/VlMqF1hPZW8q0KeTRZnm/WnYkuNIniDcc5ee5V6qvsDRK8i15QPG3zwB1BS
7J1wLf1Cr8v427dxzJYQ0az2T08nhufTjyfhHJ071RIW34qysWdpuKVS41GvBfS7
XDAVQIYaKHr3qLtA0finZ4MvAhy8gvRrYAxj9CRjBEgSw97JXM6csAFsN74rKj5d
kjgT60fAwdDUe6pFza6tK8MI/qHGR4k5Dfi5zQtZqGZbTZUw8QBFXL9ic60toB4=
=aNj6
-----END PGP SIGNATURE-----
More information about the freebsd-java
mailing list