equal
deleted
inserted
replaced
41 jint pageSize = sysconf(_SC_PAGESIZE); |
41 jint pageSize = sysconf(_SC_PAGESIZE); |
42 jint numPages = (len + pageSize - 1) / pageSize; |
42 jint numPages = (len + pageSize - 1) / pageSize; |
43 int result = 0; |
43 int result = 0; |
44 int i = 0; |
44 int i = 0; |
45 void *a = (void *) jlong_to_ptr(address); |
45 void *a = (void *) jlong_to_ptr(address); |
46 char * vec = (char *)malloc(numPages * sizeof(char)); |
46 #ifdef __linux__ |
|
47 unsigned char *vec = (unsigned char *)malloc(numPages * sizeof(char)); |
|
48 #else |
|
49 char *vec = (char *)malloc(numPages * sizeof(char)); |
|
50 #endif |
47 |
51 |
48 if (vec == NULL) { |
52 if (vec == NULL) { |
49 JNU_ThrowOutOfMemoryError(env, NULL); |
53 JNU_ThrowOutOfMemoryError(env, NULL); |
50 return JNI_FALSE; |
54 return JNI_FALSE; |
51 } |
55 } |