|
pointers
*((kpage_t**)page->ptr) = page;
This means that page is holding an address of the structure kpage_t(ie kpage_t *)
ptr is of type void * and thus can be made to point to any address, which can be address of any type no matter its an address of another address storing variable
thus page->ptr is an address which points to another address and that address is an address where a variable of type kpage_t is residing
Then regarding the macro question
((void*)(((int) (x)) & ~(PAGESIZE-1)))
This would yeild 0 if the PAGESIZE is a in 2^n
Regards,
RUV
|