Penguin

Differences between current version and previous revision of mprotect(2).

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 3 Last edited on Wednesday, September 10, 2003 9:14:19 pm by JohnMcPherson
Older page: version 2 Last edited on Saturday, March 15, 2003 1:02:07 am by PerryLorier Revert
@@ -44,9 +44,9 @@
  /* Allocate a buffer; it will have the default 
  protection of PROT_READ|PROT_WRITE. */ 
  p = malloc(1024+PAGESIZE‐1); 
  if (!p) { 
- perror("Couldn t malloc(1024)"); 
+ perror("Couldn� t malloc(1024)"); 
  exit(errno); 
 
  
  /* Align to a multiple of PAGESIZE, assumed to be a power of two */ 
@@ -56,9 +56,9 @@
  p[666] = 42; /* Write; ok */ 
  
  /* Mark the buffer read‐only. */ 
  if (mprotect(p, 1024, PROT_READ)) { 
- perror("Couldn t mprotect"); 
+ perror("Couldn' t mprotect"); 
  exit(errno); 
 
  
  c = p[[666]; /* Read; ok */ 
@@ -67,9 +67,9 @@
  exit(0); 
 
  
 !!CONFORMING TO 
-SVr4, POSIX.1b (formerly POSIX.4). SVr4 defines an additional error code [EAGAIN]. The SVr4 error conditions don't map neatly onto Linux's. POSIX.1b says that 
+SVr4, [ POSIX] .1b (formerly POSIX.4). SVr4 defines an additional error code [EAGAIN]. The SVr4 error conditions don't map neatly onto [ Linux] 's. POSIX.1b says that 
 __mprotect__ can be used only on regions of memory obtained from mmap(2). 
  
 !!SEE ALSO 
 mmap(2) 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.