I've been working on a project for a while now, and recently Blender seems to crash whenever I try to bake the fluid involved in that scene. In User Preferences > System > Memory Cache Limit (Under Sequencer/Clip editor) I have set to 2048mb. I have 8GB of RAM, so this should be fine. Also, I have no external programs running when I do this. Observing the Blender process in Task Manager, when I begin baking it's RAM usage bumps up to almost 5 gigabytes, for no reason. Is there some kind of fluid cache that I could have filled on accident? .blend file here.
The cache limit in the user preferences only limits how much memory can be used by clip editor and the sequencer to preload frames for faster playback.
Fluid simulations are not limited by that value.
You can bake the simulation from the command line without loading blender's interface.