Lines Matching full:length
16 bool DevMemDevice::read(const std::size_t offset, const std::size_t length, in read() argument
28 const std::size_t alignedSize = length + alignedDiff; in read()
30 // addr, length, prot, flags, fd, offset in read()
35 std::fprintf(stderr, "Failed to mmap at offset: 0x%zx, length: %zu\n", in read()
36 offset, length); in read()
45 std::memcpy(destination, alignedSource, length); in read()
48 sys->munmap(devMemMapped, length); in read()
54 bool DevMemDevice::write(const std::size_t offset, const std::size_t length, in write() argument
67 const std::size_t alignedSize = length + alignedDiff; in write()
69 // addr, length, prot, flags, fd, offset in write()
75 std::fprintf(stderr, "Failed to mmap at offset: 0x%zx, length: %zu\n", in write()
76 offset, length); in write()
85 std::memcpy(alignedDestination, source, length); in write()
88 sys->munmap(devMemMapped, length); in write()
109 bool PpcMemDevice::read(const std::size_t offset, const std::size_t length, in read() argument
120 int ret = sys->pread(ppcMemFd, destination, length, offset); in read()
123 std::fprintf(stderr, "IO read failed at offset: 0x%zx, length: %zu\n", in read()
124 offset, length); in read()
133 bool PpcMemDevice::write(const std::size_t offset, const std::size_t length, in write() argument
144 ssize_t ret = sys->pwrite(ppcMemFd, source, length, offset); in write()
147 std::fprintf(stderr, "IO write failed at offset: 0x%zx, length: %zu\n", in write()
148 offset, length); in write()