I’m an amateur using xCode 10.3 on a MacBook Pro in Safe Mode,Mojave 10.14.6 with 4GB of DDR to generate tensors of complex numbers (to be processed in subsequent projects). The code, which I modified from Numerical Recipes to make it handle double complex variables, uses malloc to allocate memory for the tensor. It all seems to work (or at least run to completion for tensors up to 4x625x625 but crashes when it gets to generating element about  on a tensor allocated for 4x1296x1296. This seems to be about when The memory graph climbs up to ~90 MB. The computer goes through a restart and comes back up without asking for a login password still in xCode with the project loaded and ready to build/run. On a 4GB computer it’s surprising that it crashes at 90 MB. Is there anything special in xCode or in the OS about 90 MB? Are there any suggestions about what could be causing this strange restart behavior? Is this what happens if a memory access is attempted outside the allocated range?