On 19 Nov 2009, at 10:57, Sharad Chandra wrote:

> Thanks everyone. mmap(2) worked and program did not crash. Only problem with 
> it I use only fraction of allocated memory (each request alocate minimum of 
> one page and my request is in hundreds), rest is waste of it so no one else 
> will get this memory to use. And if a process runs as daemon and makes many 
> request, It can hold a lot of it. Just a question floated in mind.


One of the defining properties of pages is that they are the granularity at 
which access protections are controlled in hardware, so your choices are a 
minimum of one page per object, or having multiple objects that share the same 
protection properties. However, it could be that you could accomplish whatever 
your goals may be using techniques other than paging; for example, using 
ptrace(2) to instrument individual accesses, binary rewriting, a virtual 
machine, source code instrumentation, or other methods along those lines that 
have been used for debugging and security over the years.

Robert_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to