Timeline for How do I read from /proc/$pid/mem under Linux?
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 14, 2022 at 13:12 | comment | added | Peter Cordes | You could probably use Linux sendfile(2) or splice(2) to send the data to the output without copying it into user-space. (And again from the stdio buffer to your local array, since you're using stdio to hopefully reduce the number of read system calls, to use chunks larger than 1 page without having to make that explicit in the code.) /proc/<PID>/maps is already Linux-specific. | |
| Nov 7, 2017 at 7:06 | review | Suggested edits | |||
| Nov 7, 2017 at 8:09 | |||||
| Jun 6, 2017 at 4:08 | comment | added | Tal Aloni | ceph3us, the common usage is to pipe the data to a file (e.g. memdump <pid> > /sdcard/memdump.bin) | |
| Jun 4, 2017 at 22:26 | comment | added | ceph3us | i get bunch of data like �/ ����� @8�l�/ ����� @��l on stdout that never ends any idea why ? compiled on Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18) | |
| Jul 14, 2016 at 0:57 | comment | added | apricot boy | You said you only tested it on Android, so I just wanted to confirm, it works well on Linux 4.4.0-28 x86_64, as you'd expect | |
| Dec 28, 2015 at 17:00 | history | edited | Tal Aloni | CC BY-SA 3.0 | Added comments explaining the code |
| Dec 27, 2015 at 15:09 | review | Late answers | |||
| Dec 27, 2015 at 15:21 | |||||
| Dec 27, 2015 at 14:56 | comment | added | muru | Add some explanation of your code. Your only comment is kinda pointless: write to stdout immediately above fwrite(..., stdout). See programmers.stackexchange.com/questions/119600/… | |
| Dec 27, 2015 at 14:54 | review | First posts | |||
| Dec 27, 2015 at 14:58 | |||||
| Dec 27, 2015 at 14:54 | history | edited | muru | CC BY-SA 3.0 | syntax highlighting |
| Dec 27, 2015 at 14:51 | history | answered | Tal Aloni | CC BY-SA 3.0 |