I have a CGI script that was made very poorly (back before I knew better) and sucks up way too much memory through calls to Mysql, and downloading lots of pages from the web... and probably lots more. It was never a problem really until usage of the site started to pick up. I have to go in an clean in up, but it may be a while before I get the chance, so I was wondering if there is a way to restrict the memory usage only to that particular program. (and then only when it runs the "bad" routine).