It depends on the latency. If it's a couple hundred milliseconds you can use Arc, or Orc with user-triggered garbage collecting.If you go below say 50ms, system memory allocations might take longer than the deadline of your processing routine, so you will want avoid them. You can go stack-only (probably easiest and safest if your data is mostly numeric) and use gc\:none, or write your own simplistic memory allocator that will return pointers from a large chunk of pre-allocated memory. You can probably get to about 1ms latency if required if you tune your interrupts a little.