I am working with some page table entries and have a virtual address. Each page has data on it and the virtual address is mapped to that page.
If I have a 32 bit virtual address, how can I "grab" the first byte at a specific virtual address?
int *virtualAddress = someaddress;
int byteAtAddress = *(virtualAddress);
int secondByte = *(virtualAddress + 4);
Obviously I am getting 4 bytes instead of getting one byte. What trick can I use here to only get one byte?
char *virtualAddress = someaddress;will do.