[Top][All Lists]

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

Re: Fw: JVM footprint

From: kotesh
Subject: Re: Fw: JVM footprint
Date: Mon, 29 Oct 2001 13:07:27 +0530

I agree with the fact that the resident momory less compared to the total
memory of the process. I think the native code in the JVM or any JNI
libraries might allocate memory using libc's malloc() mechanism: this takes
process space, but not space from the Java heap. This may be the reason for
showing more process space even though VM requires only 4Mb.
I feel this is a problem from Java side to the Objc components where memory
is really big constraint.


----- Original Message -----
From: "Nicola Pero" <>
To: "kotesh" <>
Cc: <>
Sent: Sunday, October 28, 2001 9:47 AM
Subject: Re: Fw: JVM footprint

> 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
> >  showing around 36Mb with 1.1.8 JRE and 57Mb with 1.3 JRE. It looks
> >  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
> >  consumption of JVM ??
> >
> >  Any help is greatly appreciated..

reply via email to

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