natClass.cc (MCACHE_SIZE): Define as a power of 2 minus 1.

* java/lang/natClass.cc (MCACHE_SIZE): Define as a power of 2
	minus 1.
	(method_cache): Made larger.

From-SVN: r30568
This commit is contained in:
Tom Tromey 1999-11-18 07:19:00 +00:00 committed by Tom Tromey
parent 9aa137f325
commit 5b8c39e0aa
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,14 @@
1999-11-18 Tom Tromey <tromey@cygnus.com>
* java/lang/natClass.cc (MCACHE_SIZE): Define as a power of 2
minus 1.
(method_cache): Made larger.
1999-11-11 Tom Tromey <tromey@cygnus.com>
* posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex when
initializing mutex. Initialize `count' when required.
1999-11-07 Anthony Green <green@trip.cygnus.com>
* java/util/zip/ZipFile.java: Compute the offset of the ZipEntry

View File

@ -507,14 +507,16 @@ _Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
return NULL;
}
#define MCACHE_SIZE 1013
// NOTE: MCACHE_SIZE should be a power of 2 minus one.
#define MCACHE_SIZE 1023
struct _Jv_mcache {
struct _Jv_mcache
{
jclass klass;
_Jv_Method *method;
};
static _Jv_mcache method_cache[MCACHE_SIZE];
static _Jv_mcache method_cache[MCACHE_SIZE + 1];
static void *
_Jv_FindMethodInCache (jclass klass,