[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: JVM footprint

From: Nicola Pero
Subject: Re: Fw: JVM footprint
Date: Sun, 28 Oct 2001 04:17:45 +0000 (GMT)

Ahm - this is more like a general problem of Java ... Java takes a lot of
memory and ... well I'm not sure there's something you can do about it.

I just tried writing a micro java program which sleeps five seconds and
exits ... on my machine to run it takes 8 threads recorded using 140 Mb of
virtual memory each, though in reality each of them takes `only' 5.8 Mb of
resident memory size.  This is pretty consistent with running
java/Testing/ObjC/obj/JavaTest, which - after starting the JVM - takes 5
threads recorded at 73 Mb each ... though each takes only 6.2 Mb of
resident memory size.

So I'm not surprised you get a footprint of 57Mb.  It is important to
determine which is the RSS though - it's probably around 5 Mb.

About your questino - yes, you can pass options to the JVM when you start
it (see the documentation for JNI_CreateJavaVM) - you can probably put
them in by modifying java/Source/NSJavaVirtualMachine.m - and your JVM
might have options to determine memory constraints, but I suspect it's not
going to help at all ... and even if you are able to run it in less
memory, that might well make it hugely slower.

>  How to reduce the initial foot print( memory) of JVM embedded in a
>  ObjectiveC component(AlarmServer) through JNI.The objectiveC component is
>  showing around 36Mb with 1.1.8 JRE and 57Mb with 1.3 JRE. It looks strange
>  to me when the java class prints 3M as the VM size.I have used
>  getTotalMemory() method to print the size of VM.
>  Are there any settings we can do at JNI  inorder to reduce initial memory
>  consumption of JVM ??
>  Any help is greatly appreciated..

reply via email to

[Prev in Thread] Current Thread [Next in Thread]