Skip to content

Commit

Permalink
disabled zerocopy for now, see issue #194
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Nov 6, 2018
1 parent b23ea48 commit 3475944
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mtp/backend/linux/usb/BufferAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ namespace mtp { namespace usb
public:
BufferAllocator(int fd): _fd(fd), _pageSize(sysconf(_SC_PAGESIZE)), _buffer(nullptr), _bufferSize(0), _bufferAllocated()
{
//disable mmap allocation for now, see https://github.com/whoozle/android-file-transfer-linux/issues/194
_fd = -1;
if (_pageSize <= 0)
throw posix::Exception("sysconf(_SC_PAGESIZE)");
debug("page size = ", _pageSize);
Expand Down

0 comments on commit 3475944

Please sign in to comment.