Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
/proc/pid/maps のようなものをプログラムで生成するにはどうすればよいですか? /proc/pid/maps と同じデータを取得できる API はありますか? テキストの解析は少し不安定になる可能性があります。
/proc/$pid/maps APIです。C を使用している場合は、次のscanf形式を使用して、このファイルの行を確実に解析できます。
/proc/$pid/maps
scanf
"%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n"
(ソース)