I wanted to bring this to your and @solidgoldbomb 's attention. I noticed that the pvPortMalloc takes the memory from the heap, whereas if I create the buffer in the function it is taken from the module's allocation. 

1) Why?
2) ACCEL_BUFFER_LENGTH is a dynamically assigned value. I thought that this sort of assignment of a vector was illegal in C. "In C, arrays must have their extents defined at compile-time. There's no way to postpone the definition of the size of an array until runtime." However, it compiles, runs, and seems to take memory from the local module pool. Is this a feature of FreeRTOS, or a mistake that I haven't fully comprehended yet?