| 19 | using elf_unique_ptr = std::unique_ptr<Elf, std::function<void(Elf*)>>; |
| 20 | |
| 21 | static ssize_t |
| 22 | _process_vm_readv( |
| 23 | pid_t pid, |
| 24 | const struct iovec* lvec, |
| 25 | unsigned long liovcnt, |
| 26 | const struct iovec* rvec, |
| 27 | unsigned long riovcnt, |
| 28 | unsigned long flags) |
| 29 | { |
| 30 | return syscall(SYS_process_vm_readv, pid, lvec, liovcnt, rvec, riovcnt, flags); |
| 31 | } |
| 32 | |
| 33 | static const std::string PERM_MESSAGE = "Operation not permitted"; |
| 34 | static const size_t CACHE_CAPACITY = 5e+7; // 50MB |