Matthew Dillon wrote:
>    The small-temporary-file trick is simple: create a small temporary
>    file, get a file descriptor to it, remove() the file, then ftruncate()
>    the descriptor to the amount of space you need, mmap() it
>    MAP_PRIVATE, and close the descriptor.  Since it is a private map no
>    actual space is allocated for the file, only an inode.  You can
>    leave the descriptor open if you need to 'allocate' more space using
>    additional calls to mmap().

One of his original issues was avoiding overcommit.  In the file
backed region case, as I suggested in my original response, to
get this behaviour, he would have to touch each of the blocks in
the file following the truncation, to make sure he didn't fall
into an overcommit based failure later.

-- Terry

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

Reply via email to