FACT++  1.0
JNIEXPORT jlong JNICALL Java_dim_ObjectDescriptor_newObjectDescriptor ( JNIEnv *  env,
jclass  nativeClass,
jclass  objectClass,
jint  maxEntries 
)

Definition at line 2382 of file dim_jni.c.

References DBGx, dim_Dbg_DESCRIPTORS, objectDescriptor_struct::entries, objectDescriptor_struct::entry, Memory::malloc(), objectDescriptor_struct::maxEntries, and objectDescriptor_struct::objectClass.

2383 {
2384  objectDescriptor_type* descriptor;
2385 
2386 // DBGe(dim_Dbg_DESCRIPTORS) ; /* trap only, report on exit */
2387  // todo put object descriptor and entry array in the same malloc (for dump purposes)
2388 //printf("malloc descriptor\n");
2389  if(env){}
2390  if(nativeClass){}
2391  if(maxEntries==0) maxEntries = 10;
2392  descriptor = (objectDescriptor_type*) malloc(sizeof(objectDescriptor_type));
2393  descriptor->entry = (objectDescriptorEntry_type*) malloc((size_t)(maxEntries * (jint)sizeof(objectDescriptorEntry_type)));
2394  descriptor->objectClass = (*env)->NewGlobalRef(env, objectClass);
2395  descriptor->entries = 0;
2396  descriptor->maxEntries = maxEntries;
2397 
2398  DBGx(dim_Dbg_DESCRIPTORS) printf("DimJNI: Native.newObjectDescriptor %08lx\n", (dim_long)descriptor);
2399  return (dim_long) descriptor;
2400 }
#define dim_Dbg_DESCRIPTORS
Definition: dim_jni.h:60
void * malloc()
Definition: EventBuilder.cc:99
long dim_long
Definition: dim_common.h:57
#define DBGx(test)
Definition: dim_jni.c:66
objectDescriptorEntry_type * entry
Definition: dim_jni.c:2372

+ Here is the call graph for this function: