Loading libs/binder/MemoryHeapBase.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -31,11 +31,6 @@ #include <binder/MemoryHeapBase.h> #ifdef HAVE_ANDROID_OS #include <linux/android_pmem.h> #endif namespace android { // --------------------------------------------------------------------------- Loading Loading @@ -108,18 +103,9 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset) { if (size == 0) { // try to figure out the size automatically #ifdef HAVE_ANDROID_OS // first try the PMEM ioctl pmem_region reg; int err = ioctl(fd, PMEM_GET_TOTAL_SIZE, ®); if (err == 0) size = reg.len; #endif if (size == 0) { // try fstat struct stat sb; if (fstat(fd, &sb) == 0) size = sb.st_size; } // if it didn't work, let mmap() fail. } Loading Loading
libs/binder/MemoryHeapBase.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -31,11 +31,6 @@ #include <binder/MemoryHeapBase.h> #ifdef HAVE_ANDROID_OS #include <linux/android_pmem.h> #endif namespace android { // --------------------------------------------------------------------------- Loading Loading @@ -108,18 +103,9 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset) { if (size == 0) { // try to figure out the size automatically #ifdef HAVE_ANDROID_OS // first try the PMEM ioctl pmem_region reg; int err = ioctl(fd, PMEM_GET_TOTAL_SIZE, ®); if (err == 0) size = reg.len; #endif if (size == 0) { // try fstat struct stat sb; if (fstat(fd, &sb) == 0) size = sb.st_size; } // if it didn't work, let mmap() fail. } Loading