lkml.org 
[lkml]   [1997]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mprotect


On Tue, 22 Apr 1997, John Carter wrote:

> I have just tried the example prog in the mprotect man page. Alas, it
> freaks out with "Invalid Argument".

mprotect can only protect complete pages. It needs a starting address
that is aligned with a page boundary and extends the specified length to
the nearest multiple of the page size. Chances are that malloc will not
return a page-aligned pointer, so it will probably be invalid.

Kai

PS: sorry for being off-topic on linux-gcc. The original posting should
have gone to the kernel list, or rather to the author of the man page...


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.036 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site