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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -