Both of the previous answers have been correct - but you should note that even if you compile your own PHP, or use our binary with a copy of php.ini, to increase your PHP memory limit you will still have to deal with our procwatch daemon (which kills processes on shared servers that are using too much RAM, CPU, or execute too long).
The wiki even warns of this with the statement. "Note that some variables ... are subject to internal limitations; increasing them significantly beyond the default values will not work correctly. "
The exact point at which procwatch kicks in are private, for obvious reasons, but you will find that if you routinely need over 100MB of reserved memory, you will have problems on a shared server (time to look at a VPS where you can reserve, manage, and pay for memory as you wish without affecting the "pool" of common memory you use on a shared server).
--DreamHost Tech Support