Re: [Sablevm-developer] Incrasing SVM_FRAME_NATIVE_REFS_MIN
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-03-04 01:26:46
|
This minimum is encoded in the JNI specification. You may petition Sun to increase it, or alternatively, you could implement the related JNI calls that allows native code to ask for more native references *explicitly*. I do NOT think that changing SableVM in order to support BROKEN JNI code is the right thing to do. Instead, SableVM could be made more helpful to the broken code developer by giving him a better error message, including a stack trace and an explicit message telling him about the need to either free unused local references (in a loop, for example), or to request explicitly more local references. Etienne Grzegorz B. Prokopski wrote: > Hi Etienne, > > In Debian packages I want to incrase the number of native references > to something nearer to what Sun's JVM makes available (max about 100 > AFAIR, can't find it now). Putting aside fact that apps that don't work > with 16 refs are in 99% of cases broken, I'd like to make sure it won't > hurt too much. > > $ grep -R SVM_FRAME_NATIVE_REFS_MIN . > ./constants.h:#define SVM_FRAME_NATIVE_REFS_MIN 16 > ./native.c: method->data.native_method->refargs_count + > SVM_FRAME_NATIVE_REFS_MIN; > ./native.c: method->data.native_method->refargs_count + > SVM_FRAME_NATIVE_REFS_MIN; > ./prepare.c: (((SVM_FRAME_NATIVE_REFS_MIN + 2) + > ./thread.c: jint lrefs_count = SVM_FRAME_NATIVE_REFS_MIN; > > So I don't see anything that would effectively bind maximum > value "by design" (like using some bit operations where each > bit is for one reference or similar). So besides incrasing > memory usage, possibly decrasing execution speed, what can > be the other consequences of doing that? Anything I should > really be afraid of? > > Hoping for quick and short answer, > > Grzegorz B. Prokopski > > PS: I want to upload something in shape of the final packages > that would make it into testing, before we release 1.1.1 with > GNU Classpath 0.08, which I think should happen soon after > 0.08 release, next monday. > -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |