About Implementing Scratch Disks

Hello Guys,
I want to make a Memory Management Utility very similar or like adobe photoshop preferences section.in which user can select a ram he want to use for particular application. as in photoshop user can select amount of Ram photoshop will use. and scratch disk application that will be used for storing temporary files like photoshop gives. so I want information related to this or any tutorial related to scratch disks applicatio9ns.please suggest me links for that