Replacement for Queues in RTOS
One easy way is to put a pointer to the data on the queue and consume the data using the pointer.

Note that you're trading safety for performance this way as you have to make sure that:


the buffer remains valid until the consumer has consumed the data
someone deallocates the buffer


If you're not using dynamically allocated memory you don't have to deallocate it, but you still have to make sure that the memory area is not reused before the data has been consumed.