comparison src/share/vm/prims/jvm.cpp @ 342:37f87013dfd8

6711316: Open source the Garbage-First garbage collector Summary: First mercurial integration of the code for the Garbage-First garbage collector. Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author ysr
date Thu, 05 Jun 2008 15:57:56 -0700
parents 018d5b58dd4f
children 1ee8caae33af
comparison
equal deleted inserted replaced
189:0b27f3512f9e 342:37f87013dfd8
375 375
376 376
377 JVM_ENTRY_NO_ENV(jlong, JVM_FreeMemory(void)) 377 JVM_ENTRY_NO_ENV(jlong, JVM_FreeMemory(void))
378 JVMWrapper("JVM_FreeMemory"); 378 JVMWrapper("JVM_FreeMemory");
379 CollectedHeap* ch = Universe::heap(); 379 CollectedHeap* ch = Universe::heap();
380 size_t n = ch->capacity() - ch->used(); 380 size_t n;
381 {
382 MutexLocker x(Heap_lock);
383 n = ch->capacity() - ch->used();
384 }
381 return convert_size_t_to_jlong(n); 385 return convert_size_t_to_jlong(n);
382 JVM_END 386 JVM_END
383 387
384 388
385 JVM_ENTRY_NO_ENV(jlong, JVM_MaxMemory(void)) 389 JVM_ENTRY_NO_ENV(jlong, JVM_MaxMemory(void))