comparison src/clojure/clojure.cpp @ 93:4c60ebca1a9d

added function to get all the GB's memory.
author Robert McIntyre <rlm@mit.edu>
date Sun, 11 Mar 2012 20:16:09 -0500
parents 1ff2c546f5ad
children cb487c4ce5c0
comparison
equal deleted inserted replaced
92:1ff2c546f5ad 93:4c60ebca1a9d
128 JNIEXPORT jint JNICALL Java_com_aurellem_gb_Gb_getRAMSize 128 JNIEXPORT jint JNICALL Java_com_aurellem_gb_Gb_getRAMSize
129 (JNIEnv *env, jclass clazz){ 129 (JNIEnv *env, jclass clazz){
130 return getRamSize(); 130 return getRamSize();
131 } 131 }
132 132
133
134 /*
135 * Class: com_aurellem_gb_Gb
136 * Method: getMemory
137 * Signature: ([I)V
138 */
139 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_getMemory
140 (JNIEnv *env, jclass clazz, jintArray arr){
141 jint *mem_store = env->GetIntArrayElements(arr, 0);
142 storeMemory(mem_store);
143 env->ReleaseIntArrayElements(arr, mem_store, 0);
144 }
145
146
133 /* 147 /*
134 * Class: com_aurellem_gb_Gb 148 * Class: com_aurellem_gb_Gb
135 * Method: getRAM 149 * Method: getRAM
136 * Signature: ([I)V 150 * Signature: ([I)V
137 */ 151 */
148 * Method: getROM 162 * Method: getROM
149 * Signature: ([I)V 163 * Signature: ([I)V
150 */ 164 */
151 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_getROM 165 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_getROM
152 (JNIEnv *env, jclass clazz, jintArray arr){ 166 (JNIEnv *env, jclass clazz, jintArray arr){
153 jint *ram_store = env->GetIntArrayElements(arr, 0); 167 jint *rom_store = env->GetIntArrayElements(arr, 0);
154 storeRom(ram_store); 168 storeRom(rom_store);
155 env->ReleaseIntArrayElements(arr, ram_store, 0); 169 env->ReleaseIntArrayElements(arr, rom_store, 0);
156 } 170 }
157 171
158 172
159 /* 173 /*
160 * Class: com_aurellem_gb_Gb 174 * Class: com_aurellem_gb_Gb