lkml.org 
[lkml]   [2001]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question: Memory change request
On Wed, Jan 24, 2001 at 12:44:58AM -0600, Leslie Donaldson wrote:

I need a block of memory that can notify me or even a flag set when
it has been written to. I was thinking of letting the user code generate
some sort of page fault... Any random thoughts would be greatly
appreciated.

mmm ... Basically dirty page logic for user space....

mprotect the page(s) you are interested in so you can't write to them
and catch SEGV -- when someone attempts to write you can pull apart
the stack frame mark the page(s) RO and continue.

if you are really stuck i think i have example code to do this
somewhere for ia32 (stack frame is arch. dependent)


--cw


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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