mprotect for change function head instructions in memory.
current code use 4K size page, in normal machine should be OK;
but in large page (such as 2M size) mechine, mprotect system call return failed, because memory size not in bound.
so here gives a fix, read page size from kernel config, then set mprotect the right size.
mprotect for change function head instructions in memory. current code use 4K size page, in normal machine should be OK; but in large page (such as 2M size) mechine, mprotect system call return failed, because memory size not in bound. so here gives a fix, read page size from kernel config, then set mprotect the right size.