Re:You're Doing It Wrong: CS in the real world
by davidcuddeback on Sunday June 13, 2010 @09:09PM
(#1428545)
FTA: A 300-GB backing store, memory mapped on a machine with no more than 16 GB of RAM, is quite typical. The user paid for 64 bits of address space, and I am not afraid to use it.
He's writing a data structure that's not intended to fit within physical memory. mlock() doesn't do you any good in that scenario.
In other words, if he had just used mlock() to make sure his heap wasn't getting swapped out, he would have gotten better performance and avoided the need to invent a "new" data structure. He chose a really bad example to get on a soapbox about.