1) give malloced pages a higher priority than disc buffer pages. This
has the disadvantage of crippling disc access performance for
frequently used pages (like libc :-)
2) providing a hint to the kernel that I will be accessing a file in
a sequential fashion, and the kernel then reclaims the oldest pages in
the file in preference to writing malloced pages to swap. Since I may
either use read() or mmap() to read the file, this scheme should work
for both those cases
3) mlocking the malloced pages, but that's very unfriendly (and good
luck if my file happens to be bigger than RAM)
I like (2) the best (this does not appear to be implemented), but
perhaps there are problems with this, or someone can see a better way
to do it. The current MM scheme does not work well with big data.
Regards,
Richard....