diff options
author | Anthony Green <green@cygnus.com> | 1999-12-06 06:33:56 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 1999-12-06 06:33:56 +0000 |
commit | d3189ab7da01660ae469e5e92ef4d9d0b266c1d0 (patch) | |
tree | 6e445f9b787b6905ed0e3cc7d9007202bf9bce81 | |
parent | d4203cb4adace060fc70ade4ade6b9fc05abaa0f (diff) | |
download | gcc-d3189ab7da01660ae469e5e92ef4d9d0b266c1d0.zip gcc-d3189ab7da01660ae469e5e92ef4d9d0b266c1d0.tar.gz gcc-d3189ab7da01660ae469e5e92ef4d9d0b266c1d0.tar.bz2 |
jvm.h: Declare many functions with __attribute__((__malloc__)).
* include/jvm.h: Declare many functions with
__attribute__((__malloc__)).
* gcj/javaprims.h: Ditto.
From-SVN: r30794
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/gcj/javaprims.h | 12 | ||||
-rw-r--r-- | libjava/include/jvm.h | 17 |
3 files changed, 23 insertions, 12 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index efb4b1f..27181ab 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +1999-12-05 Anthony Green <green@cygnus.com> + + * include/jvm.h: Declare many functions with + __attribute__((__malloc__)). + * gcj/javaprims.h: Ditto. + Thu Dec 2 17:26:47 1999 Anthony Green <green@cygnus.com> * THANKS: Giving credit where credit is due. diff --git a/libjava/gcj/javaprims.h b/libjava/gcj/javaprims.h index 72fbb25..b224214 100644 --- a/libjava/gcj/javaprims.h +++ b/libjava/gcj/javaprims.h @@ -257,20 +257,22 @@ struct _Jv_JNIEnv; typedef struct _Jv_Field *jfieldID; typedef struct _Jv_Method *jmethodID; -extern "C" jobject _Jv_AllocObject (jclass, jint); +extern "C" jobject _Jv_AllocObject (jclass, jint) __attribute__((__malloc__)); extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass); -extern "C" jstring _Jv_AllocString(jsize); -extern "C" jstring _Jv_NewString (const jchar*, jsize); +extern "C" jstring _Jv_AllocString(jsize) __attribute__((__malloc__)); +extern "C" jstring _Jv_NewString (const jchar*, jsize) + __attribute__((__malloc__)); extern "C" jchar* _Jv_GetStringChars (jstring str); extern "C" jint _Jv_MonitorEnter (jobject); extern "C" jint _Jv_MonitorExit (jobject); -extern "C" jstring _Jv_NewStringLatin1(const char*, jsize); +extern "C" jstring _Jv_NewStringLatin1(const char*, jsize) + __attribute__((__malloc__)); extern "C" jsize _Jv_GetStringUTFLength (jstring); extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *); extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__)); extern "C" void _Jv_Sjlj_Throw (void *) __attribute__ ((__noreturn__)); -extern "C" void* _Jv_Malloc (jsize); +extern "C" void* _Jv_Malloc (jsize) __attribute__((__malloc__)); extern "C" void _Jv_Free (void*); typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__))); diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 33925d3..791cdfa 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -61,11 +61,11 @@ extern java::lang::Class StringClass; typedef void _Jv_FinalizerFunc (jobject); /* Allocate space for a new Java object. */ -void *_Jv_AllocObj (jsize size); +void *_Jv_AllocObj (jsize size) __attribute__((__malloc__)); /* Allocate space for an array of Java objects. */ -void *_Jv_AllocArray (jsize size); +void *_Jv_AllocArray (jsize size) __attribute__((__malloc__)); /* Allocate space that is known to be pointer-free. */ -void *_Jv_AllocBytes (jsize size); +void *_Jv_AllocBytes (jsize size) __attribute__((__malloc__)); /* Initialize the GC. */ void _Jv_InitGC (void); /* Register a finalizer. */ @@ -102,7 +102,7 @@ void _Jv_SetInitialHeapSize (const char *arg); void _Jv_SetMaximumHeapSize (const char *arg); /* Allocate some unscanned bytes. Throw exception if out of memory. */ -void *_Jv_AllocBytesChecked (jsize size); +void *_Jv_AllocBytesChecked (jsize size) __attribute__((__malloc__)); extern "C" void JvRunMain (jclass klass, int argc, const char **argv); void _Jv_RunMain (const char* name, int argc, const char **argv); @@ -145,8 +145,10 @@ _Jv_GetArrayElementFromElementType (jobject array, } extern "C" void _Jv_ThrowBadArrayIndex (jint bad_index); -extern "C" jobject _Jv_NewArray (jint type, jint size); -extern "C" jobject _Jv_NewMultiArray (jclass klass, jint dims, ...); +extern "C" jobject _Jv_NewArray (jint type, jint size) + __attribute__((__malloc__)); +extern "C" jobject _Jv_NewMultiArray (jclass klass, jint dims, ...) + __attribute__((__malloc__)); extern "C" void *_Jv_CheckCast (jclass klass, jobject obj); extern "C" void *_Jv_LookupInterfaceMethod (jclass klass, Utf8Const *name, Utf8Const *signature); @@ -160,7 +162,8 @@ extern jclass _Jv_FindClass (_Jv_Utf8Const *name, extern jclass _Jv_FindClassFromSignature (char *, java::lang::ClassLoader *loader); -extern jobject _Jv_NewMultiArray (jclass, jint ndims, jint* dims); +extern jobject _Jv_NewMultiArray (jclass, jint ndims, jint* dims) + __attribute__((__malloc__)); /* Checked divide subroutines. */ extern "C" |