Soot using much memory is not a bug. Your Hello-World program transitively calls thousands of methods, all of which are analyzed.
As the exception message suggests, you should use:
java -Xmx400m soot.Main ...
This is a JVM option, not a Soot option.