> > I am creating a virtual memory manager.
> > 
> > Currently I am doing a
> > mmap(...PROT_NONE, MAP_ANON ) to reserve the memory.
> > then when committing the memory I am using mprotect( ...PROT_READ |
> > PROT_WRITE )
> 
> mmap For reservation of memory; you should
> mmap the fd for /dev/zero, with MAP_ANON
> to grab pages initially.

The man pages state that the fd must be -1 for MAP_ANON.
an open() /dev/zero will return an valid file descriptor. So how would I 
mmap using /dev/zero?

> Too bad there isn't an "Advance UNIX programming for Windows
> Programmers" book.  8-(.

Sounds like their could be a good market for one ;-)

Jason

Jason Mawdsley ~ [EMAIL PROTECTED]
Software Designer ~ m_ a c a d a m i a n    t e c h n o l o g i e s

"Software developers for the world's leading technology companies."
http://www.macadamian.com



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to