The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-17-2007
uvrakesh uvrakesh is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 78
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