linux kernel - How to read return value of mmap -


i'm new topic, have mmaped 3 pages. how can read content of each? know have use page_shift don't know how.

unsigned int* address = mmap(...) 

somethings following...

#define page_size 4096  unsigned int * address = mmap(...)  unsigned int * page0 = &address[ 0 * page_size / sizeof(int) ]; unsigned int * page1 = &address[ 1 * page_size / sizeof(int) ]; unsigned int * page2 = &address[ 2 * page_size / sizeof(int) ]; 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -