|
藍森林 http://www.lslnet.com 2006年6月6日 10:18
內存映射問題!
我想問一下我怎樣在我的程序裡判斷一個內存映射區是匿名映射區,我想用/proc文件系統實現;我用的是下面的結構體.
例如:E9100000 2816K read/write/shared [ anon ](pmap輸出)
typedef struct prmap {
caddr_t pr_vaddr; /* Virtual address */
size_t pr_size; /* Size of mapping in bytes */
off_t pr_off; /* Offset into mapped object, if any */
uint_t pr_mflags; /* Protection and attribute flags */
uint_t pr_pagesize; /* pagesize (bytes) for this mapping */
long pr_filler[3]; /* Filler for future expansion */
} prmap_t; |
內存映射問題!
好有難度
看看內核源碼分析
http://www.lisoleg.net/cgi-bin/lisoleg.pl?view=kjiajia.html
看看有沒有參考 |
| |