You mean like vmtouch and madvise?
I use vmtouch all the time to preload or even lock certain data/code into RAM.