Use a buffer cache that supports limitation of memory usage.