Runtime.getRuntime().maxMemory() returns incredibly large value

"[email protected]" <[email protected]> Mon, 30 May 2016 13:24:51 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <SN1PR12MB041479C50920E00AB58431D692450@SN1PR12MB0414.namprd12.prod.outlook.com>
Hi,
I converted OrientDB (https://github.com/orientechnologies/orientdb) current sources into a .NET dll using ikvmc tool (v 8.1.5717.0).
Unfortunately in the startup code of OrientDB code a check against Runtime.getRuntime().maxMemory() is made which returns a value of 9223372036854775807 for me.
This value is then used by the OrientDB code and fails with a NumberFormatException due to some call of integer.tryParse.

Interestingly running the original OrientDB jar files with java.exe does not exhibit the same exception, which is due to a much lower value returned by the Runtime.getRuntime().maxMemory()
call (something like 477102080).

So is there an explanation for the very large number returned by ikvm runtime? Is it a bug?

There would be a way to work around the exception throwing code in OrientDB if it would be possible to somehow provide JAVA runtime parameters like -XX:MaxDirectMemorySize=.
But this does not seem to be possible or did I miss something?

Thanks
Torsten

Agilent Technologies R&D and Marketing GmbH & Co. KG
Hewlett-Packard-Strasse 8 | 76337 Waldbronn

Tel: 07243 / 6022152
[email protected]<mailto:[email protected]>
www.agilent.com<http://www.agilent.com/>

[Logo_Signatur]

Agilent Technologies R&D and Marketing GmbH & Co. KG, Hewlett-Packard-Str. 8, 76337 Waldbronn
Sitz der Gesellschaft: Waldbronn - Amtsgericht Mannheim, HRA 706662
Persönlich haftende Gesellschafterin: Agilent Technologies R&D and Marketing Verwaltungs-GmbH,
Hewlett-Packard-Str. 8, 76337 Waldbronn
Sitz der persönlich haftenden Gesellschafterin: Waldbronn - Amtsgericht Mannheim, HRB 723933
Geschäftsführer: Dr. Stefan Schütte

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
image002.jpg (image/jpeg, 2.1 KB) - not displayed