It all depends on how much memory you have. You cant allocate more memory than is in your system. So I assume your in V9.
Lets say you vane 1GB of Ram. Set Toolpath to 140,000 and Database to 30,000 and that should be good for most work. If you still get the error you can bump up the Toolpath on 20,000 increments.
The reason you shouldn't set it at 1,000,000 (all your memory) is because you need memory for other Windows operations to run (the OS and other Apps.).
Some people will tell you to set it to 1/2 of your available ram. Wrong also. What if you want to open 2 sessions of Mastercam (or even 3). You wont have enough memory for each session to run (including the OS).
Mike Mattera
Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More
http://www.tipsforcadcam.com