added test to make sure area is unmapped
This commit is contained in:
parent
b3e40fea08
commit
926cac4baf
1 changed files with 10 additions and 0 deletions
|
@ -125,6 +125,16 @@ int test_mmap(void)
|
|||
}
|
||||
munmap(map,MAPLEN);
|
||||
|
||||
/* test if area is really unmapped */
|
||||
for(adr=map;adr<(void *)map+MAPLEN;adr+=PAGE_SIZE){
|
||||
ret=test_segfault(adr);
|
||||
if(ret){
|
||||
printf("%p segfaulted (ok)\n",adr);
|
||||
}else{
|
||||
printf("E: %p still mapped\n",adr);
|
||||
}
|
||||
}
|
||||
|
||||
free(buf);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue