I think I increased my heap size to 1 GB in NetBeans since I changed the config to look like this:
netbeans_default_options=\"-J-Xmx1g ......
You can use jconsole (standard with most JDKs) to check heap sizes of any java process.