Matt Dillon wrote:
>
> You may be able to achieve an effect very similar to mlock(), but
> runnable by the 'news' user without hacking the kernel, by
> writing a quick little C program to mmap() the two smaller history
> files and then madvise() the map using MADV_WILLNEED in a loop
> with a sleep(15). Keeping in mind that expire may recreate those
> files, the program should unmap, close(), and re-open()/mmap/madvise the
> descriptors every so often (like once a minute). You shouldn't have
> to access the underlying pages but that would also have a similar
> effect. If you do, use a volatile pointer so GCC doesn't optimize
> the access out of the loop. e.g.
Err... wouldn't it be better to write a quick little C program that
mlocked the files? It would need suid, sure, but as a small program
without user input it wouldn't have security problems.
--
Daniel C. Sobral (8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"The bronze landed last, which canceled that method of impartial
choice."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message