So that's strange because there's almost 90k free and it appears to be struggling to store 500 3-tuples of floats. To add to that, it finally does manage it and then by some coincidence there's not enough memory to even run a simple print statement with some basic maths in it.

Dropping the list size to 250 and this improves things but reveals that only ~37 bytes is needed per entry.

I thought this was a bug at first but perhaps it's just an issue with the garabage collection that's going on and not going on inside clue.magnetic and during the loop leading to massive fragmentation?

I turned off auto_refresh to rule that out and the display updates does not appear to be a factor here. A for loop with list append does the same thing too so it's not a list-comprehension-ism. A for loop that pre-allocates enough space for it before going into the magnetic code does work.