Created
January 29, 2021 22:59
-
-
Save mkropat/51eb102fa318f274de2a36048b65ad30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -I$JAVA_HOME/include -I$JAVA_HOME/include/linux jsizes.c -o jsizes && ./jsizes | |
#include <stdio.h> | |
#include <jni.h> | |
int main() { | |
printf("jboolean %li\n", sizeof (jboolean)); | |
printf("jbyte %li\n", sizeof (jbyte)); | |
printf("jchar %li\n", sizeof (jchar)); | |
printf("jshort %li\n", sizeof (jshort)); | |
printf("jint %li\n", sizeof (jint)); | |
printf("jlong %li\n", sizeof (jlong)); | |
printf("jfloat %li\n", sizeof (jfloat)); | |
printf("jdouble %li\n", sizeof (jdouble)); | |
printf("jsize %li\n", sizeof (jsize)); | |
printf("\n"); | |
printf("unsigned char %li\n", sizeof(unsigned char)); | |
printf("unsigned short %li\n", sizeof(unsigned short)); | |
printf("unsigned int %li\n", sizeof(unsigned int)); | |
printf("unsigned long %li\n", sizeof(unsigned long)); | |
printf("unsigned long long %li\n", sizeof(unsigned long long)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment