Re: [kaffe] kaffe--freeMemory Second Trying

2002-11-05 Thread Dalibor Topic
Hi xu,

--- xch [EMAIL PROTECTED] wrote:
  In my application, I start two threads, one is
 doing something ,the other is measuring the free
 space of the total System in a certain interval(5
 milliseconds) by calling the method above while the
 first one is runing.
  I use kaffe to run it, the measuring thread always
 get a constant value, I can not understand and think
 it's impossible since another thread must use some
 memory.I run my application using JDK1.3, things
 goes well, I can see the measured value is changing.
 Could you please tell me where is the wrong thing?  

it depends what your worker method is doing.

If you have a method that keeps allocating more
memory, than you should see the free memory decrease.
If on the other hand your worker method calls some
system methods to do some work, than the outcome is
implemenation specific. Kaffe's implementation of the
system methods could be more efficient than Sun's, and
don't require new objects to be instantiated, for
example.

best regards,

dalibor topic

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



[kaffe] kaffe--freeMemory Second Trying

2002-10-22 Thread xch




hello,
I hava a question about the method 
Runtime.freeMemory() in kaffe.I doubt whether it give the right value.My problem 
is :
In my application, I start two threads, one is doing 
something ,the other is measuringthe free space of the total System in a certain interval(5 
milliseconds)bycalling the method above while the first one is 
runing.
I use kaffe to run it, the measuring thread always get a 
constant value,I can not understand and think it's impossiblesince 
another thread must use somememory.I run my application usingJDK1.3, 
things goes well, I can see the measured valueis changing.
Could you please tell mewhere is the wrong 
thing?

sincerely,
Xu chenhui