Hi All
Now I 'm testing mmap function, and my pagesize is 4k bytes. After mapping
8k virtual memory, by dtrace I find there is only one pagefault when I access
memory like that s[0] , s[4096].
The following is my test spteps.
1. fd = open("/var/tmp/mmap.file", O_RDWR);
2. I'm sure fd is validate. then
s = (char *)mmap(NULL, 8192,
PROT_READ | PROT_WRITE,
MAP_PRIVATE,
fd, 0L);
3. for (i =0; i < 8192; i +=4096)
a=s[i];
Based on my knowledge, the step 3 should has two pagefault traps. because our
pagesize is 4k, correct?
Thanks,
Ma Ling
---------------------------------
Tonight's top picks. What will you watch tonight? Preview the hottest shows on
Yahoo! TV. _______________________________________________
perf-discuss mailing list
[email protected]