Allocating memory from frame buffer for MLX90640

When using the MLX90640 I having been trying to allocate two buffers for the read_ir(…) function in ram.
However I get a memory error (cannot allocate 4096 bytes(?)).
So I thought of using sensor.alloc_extra_fb but this returns a img object. Also what type do I use anyway.
How can I get round this problem?

Forgot to add that I am using an M7 with firmware version 3.1.0

Mmm, I don’t really have an answer for this. Um, does this error happen after the first loop or a few loops in? If it’s a few loops in then you’re getting heap fragmentation and you just need to call “del object” and then “gc.collect()” after you’ve finished with things in your script to force the heap from getting fragmented.

The extra_fb cannot be used as heap RAM however.