Re: [Sablevm-developer] Incrasing SVM_FRAME_NATIVE_REFS_MIN
Brought to you by:
egagnon
From: Grzegorz B. P. <ga...@de...> - 2004-03-04 03:10:29
|
LOL! I've just saw this email. Good to know our thoughts loiter the same paths ;-) What can I say, I pretty much agree with the below. But I can't get it all done right now, and even if - I think thread.interrupt and friends are of higher priority (due to gtk peers/awt stuff) especially that they can't be worked around. And honestly, I'd be _very_ happy to put my hands in these right now. But I've been working on release and Debian packages since I came back. I think they're in quite good shape right now so I am gonna give them some rest and try to finally nail down these inlined performance problems. Wish me luck, I'am gonna need it :-/ GBP W li=B6cie z =B6ro, 03-03-2004, godz. 21:05, Etienne Gagnon pisze:=20 > I mean, have a [deep ;-)] look at: > http://java.sun.com/docs/books/jni/html/functions.html#70207 >=20 > Specifically: >=20 > Global and Local References > ... > * DeleteLocalRef reclaims the virtual machine resource needed for > a local reference. > * NewLocalRef is new in Java 2 SDK release 1.2. > * EnsureLocalCapacity reserves space in the current thread for a > fixed number of local references to be created. > EnsureLocalCapacity is new in Java 2 SDK release 1.2. > * PushLocalFrame and PopLocalFrame create a nested scope for local > references. Both functions are new in Java 2 SDK release 1.2. >=20 > So, implementing EnsureLocalCapacity would be a nice starting point. > SableVM's stack layout has be designed so that Push/PopLocalFrame > could be easily implemented too; so this would be a nice second step. >=20 > Overall, implementing these 3 JNI functions would be better, IMHO, > than wasting precious memory resources on every native call to support > broken applications. I do NOT think that automatically calling > EnsureLocalCapacity when an application goes over 16 local refs is a > good idea, either, as it would be hiding the bugs (memory leak). > Remember that keeping useless local refs around is very costly in > memory, as it prevents the garbage collector from collecting > *pointed-to* objects! >=20 > Etienne --=20 Grzegorz B. Prokopski <ga...@de...> Debian GNU/Linux http://www.debian.org SableVM - LGPLed JVM http://www.sablevm.org Why SableVM ?!? http://devel.sablevm.org/wiki/WhySableVM |