lkml.org 
[lkml]   [2005]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Understanding Linux addr space, malloc, and heap
Vincent W. Freeh wrote:
> First, thanks for all the help and attention. I am learning much.
>
> I think the focus of this discussion should be on mprotect. I
> understand that spec says it only works on mmap'd memory. So does
> malloc use mmap? If not why does it work at all?
>
> Probably the most problematic issue, tho, is why does mprotect return 0
> even though it failed to change permissions on the 66th page?

Do you have code that shows this?

I tried to change the example in the mprotect man page to loop N times
(N given on the command line) malloc'ing and mprotect'ing N pages and
then accessing the N'th page and it always gave SIGSEGV, for any N from
1 to 100.

--
Paulo Marques - www.grupopie.com

The rule is perfect: in all matters of opinion our
adversaries are insane.
Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-21 18:29    [from the cache]
©2003-2011 Jasper Spaans