我正在遍历 VMALLOC_START 和 VMALLOC_END 之间的页面,我想检查我每次获得的地址是否有效。我该如何管理?
我像这样遍历页面:
unsigned long *p;
for(p = (unsigned long *) VMALLOC_START; p <= (unsigned long *) (VMALLOC_END - PAGE_SIZE); p += PAGE_SIZE)
{
//How to check if p is OK to access it?
}
谢谢!