Eclipse Help (Search for "Running Eclipse") indicates how to increase the Java heap memory from its default of 384MB. I tried it together with your suggestion and, finally, indexing succeeded.
I used the following env vars and command line to start eclipse:
export ECLIPSE_MEM_START="4096M"
export ECLIPSE_MEM_MAX="8192M"
eclipse -vmargs -Xmx2048M