Using mincore

I want to use the mincore command
whose syntax is int mincore(void *start, size_t length, unsigned char *vec);

I am confused about the value of 'start'.
In the man page they say: "start must lie on a page boundary. It is the caller's responsibility to round up to the nearest page."
Ho do I do that? Suppose I have some memory location. How
do I translate it to start?

Thanks a lot for your help
You have to determine the page size, then

pageAligned = memoryLoc - ( memoryLoc % pageSize );

Thank you!
Topic archived. No new replies allowed.