Please continue the discussion here...
Sorry I'm not sure I fully understand that comment. What do you mean by "Removing that and leaving the low memory mode sections appears to work fine." Are you saying that a particular gcode instruction is causing the problem? If you have a small gcode file that causes the problem please post it here.
From the stack trace it looks like you are running out of memory while trying to allocate space for a move segment. That is pretty unusual. Are you changing any of the queue lengths at all (using M595)? Are you using segmented moves (set using the S and T parameters to M669)?
Can you try the following test for me:
Install 3.5.0.rc.3 and reboot the board. Run any startup macros etc. you would normally use then run M122 and save the output), then run as small a test gcode file that know will cause the problem with 3.5.1 and after it has completed run M122 again. Post both M122 outputs here.
Then install 3.5.1 and go through the same start up process (but do not run the gcode file that causes the crash) then run M122 and post that output here as well.