It is "easy". Just do the following (all as one line):
maxima._eval_line(":lisp (ext:set-limit 'ext:heap-size 100000000000)",
wait_for_prompt=False)
That makes it so Maxima can use up to 100GB (?). If you try this and
it works, please report back -- we could easily make it the default.
It seems this is just an upper bound: I just tried it on my 2GB laptop
and it works fine.
See trac 6772: http://trac.sagemath.org/sage_trac/ticket/6772
I've posted a little easy-to-review patch there that fixes this issue
once-for-all, which needs review.
William