Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 9 of 9) sorted by relevance

/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryTest.java40 long ptr = base_ptr + ptr_offset; // To test aligned and unaligned accesses. in testSetIntArray() local
44 Memory.pokeIntArray(ptr, values, 0, values.length, false); in testSetIntArray()
45 assertIntsEqual(values, ptr, false); in testSetIntArray()
46 assertIntsEqual(swappedValues, ptr, true); in testSetIntArray()
49 Memory.pokeIntArray(ptr, values, 0, values.length, true); in testSetIntArray()
50 assertIntsEqual(values, ptr, true); in testSetIntArray()
51 assertIntsEqual(swappedValues, ptr, false); in testSetIntArray()
55 Memory.pokeIntArray(ptr + i * scale, values, i, 1, true); in testSetIntArray()
57 assertIntsEqual(values, ptr, true); in testSetIntArray()
58 assertIntsEqual(swappedValues, ptr, false); in testSetIntArray()
[all …]
/libcore/luni/src/test/native/
Dlibcore_libcore_util_NativeAllocationRegistryTest.cpp75 static void finalize(uint64_t* ptr) { in finalize() argument
76 gNumNativeBytesAllocated -= *ptr; in finalize()
77 delete ptr; in finalize()
92 uint64_t* ptr = new uint64_t; in Java_libcore_libcore_util_NativeAllocationRegistryTest_doNativeAllocation() local
93 *ptr = static_cast<uint64_t>(size); in Java_libcore_libcore_util_NativeAllocationRegistryTest_doNativeAllocation()
94 return static_cast<jlong>(reinterpret_cast<uintptr_t>(ptr)); in Java_libcore_libcore_util_NativeAllocationRegistryTest_doNativeAllocation()
/libcore/luni/src/main/native/
Dlibcore_util_NativeAllocationRegistry.cpp25 jlong ptr) { in NativeAllocationRegistry_applyFreeFunction() argument
26 void* nativePtr = reinterpret_cast<void*>(static_cast<uintptr_t>(ptr)); in NativeAllocationRegistry_applyFreeFunction()
DNetworkUtilities.cpp393 void* ptr = getScopedBytesFromByteBuffer(env, msgiovItem, byteLen, scopeBufArray.isRW()); in byteBufferArrayToIOV() local
394 if (!ptr) { in byteBufferArrayToIOV()
399 scopeBufArray.setArrayItem(i, ptr); in byteBufferArrayToIOV()
402 iovarr[i].iov_base = (unsigned char*)(((ScopedBytesRW*)ptr)->get()); in byteBufferArrayToIOV()
405 iovarr[i].iov_base = (unsigned char*)(((ScopedBytesRO*)ptr)->get()); in byteBufferArrayToIOV()
Dlibcore_io_Linux.cpp318 jbyte* ptr = const_cast<jbyte*>(mScopedBuffers.back()->get()); in init() local
319 if (ptr == NULL) { in init()
323 iov.iov_base = reinterpret_cast<void*>(ptr + offsets[i]); in init()
1928 void* ptr = reinterpret_cast<void*>(static_cast<uintptr_t>(address)); in Linux_mincore() local
1930 throwIfMinusOne(env, "mincore", TEMP_FAILURE_RETRY(mincore(ptr, byteCount, vec))); in Linux_mincore()
1950 void* ptr = reinterpret_cast<void*>(static_cast<uintptr_t>(address)); in Linux_mlock() local
1951 throwIfMinusOne(env, "mlock", TEMP_FAILURE_RETRY(mlock(ptr, byteCount))); in Linux_mlock()
1957 void* ptr = mmap64(suggestedPtr, byteCount, prot, flags, fd, offset); in Linux_mmap() local
1958 if (ptr == MAP_FAILED) { in Linux_mmap()
1961 return static_cast<jlong>(reinterpret_cast<uintptr_t>(ptr)); in Linux_mmap()
[all …]
/libcore/ojluni/src/main/native/
DUnixFileSystem_md.c338 struct dirent64 *ptr; in Java_java_io_UnixFileSystem_list0() local
359 while ((ptr = readdir64(dir)) != NULL) { in Java_java_io_UnixFileSystem_list0()
361 if (!strcmp(ptr->d_name, ".") || !strcmp(ptr->d_name, "..")) in Java_java_io_UnixFileSystem_list0()
371 name = newStringPlatform(env, ptr->d_name); in Java_java_io_UnixFileSystem_list0()
373 name = JNU_NewStringPlatform(env, ptr->d_name); in Java_java_io_UnixFileSystem_list0()
DUnixNativeDispatcher.c760 struct dirent64* ptr; in Java_sun_nio_fs_UnixNativeDispatcher_readdir() local
763 ptr = readdir64(dirp); in Java_sun_nio_fs_UnixNativeDispatcher_readdir()
764 if (ptr == NULL) { in Java_sun_nio_fs_UnixNativeDispatcher_readdir()
770 jsize len = strlen(ptr->d_name); in Java_sun_nio_fs_UnixNativeDispatcher_readdir()
773 (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte*)(ptr->d_name)); in Java_sun_nio_fs_UnixNativeDispatcher_readdir()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixSecureDirectoryStream.java126 long ptr = 0L; in newDirectoryStream() local
133 ptr = fdopendir(newdfd1); in newDirectoryStream()
143 return new UnixSecureDirectoryStream(child, ptr, newdfd2, null); in newDirectoryStream()
DUnixFileSystemProvider.java422 long ptr = opendir(dir); in newDirectoryStream() local
423 return new UnixDirectoryStream(dir, ptr, filter); in newDirectoryStream()