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
Post a Comment