Identifying problematic item (out of Memory / Java heap)

by the way - can I use both?
The option above to dump the OOM and the expanded memory?
like this?

EXTRA_JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xms400m -Xmx650m"