Can't you go to Run Configurations (to configure hosted mode) and set
more memory as a VM argument? Well that assumes you use Eclipse. I
have -Xmx512m and it never has a problem.
If that doesn't work, I'd try setting a VM argument under Advanced
when you click to compile the project. I"m not sure if the settings
get carried over to developer mode though, so that's why I'd set it
directly first.