From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,536e3b962c276e39,start X-Google-Attributes: gidf678f,public From: gutleber@arcs.ac.at (Gutleber Johannes) Subject: Determining begin and end of a page Date: 1996/02/07 Message-ID: <4fapo4$1dkq@ftp.univie.ac.at>#1/1 X-Deja-AN: 138908816 organization: Vienna University, Austria newsgroups: comp.unix.osf.misc I want to write a page fault handling routine. I know that I can change the pages protection with the mprotect() system call. I know how to determine when a read/write violation to this protected page happend by using a signal routine. I also know which word in the page has been accessed and caused the violation by examining the signal context. Question: How can I get the first and/or the last byte/word in the page in which the violation happened? I am searching for something like: double *get_beginning_of_page (double *address); If anybody knows a solution please help me. Thank You Johannes Gutleber.