On 9/21/07, love_code meta <[EMAIL PROTECTED]> wrote: > 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?
What is the the size of /var/tmp/mmap.file? -- Just me, Wire ... Blog: <prstat.blogspot.com> _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org