static void *setupAlloc(xil_dma* const me, int length, int byte_num) { void *array = &me->map[me->alloc_offset]; me->alloc_offset += xdma_calc_size(length, byte_num); return array; }
// Static allocator void *xdma_alloc(int length, int byte_num) { void *array = &map[alloc_offset]; alloc_offset += xdma_calc_size(length, byte_num); return array; }
static void *setupAlloc(xil_dma* const me, int length, int size_of_type) { void *array = &me->map[me->alloc_offset]; me->alloc_offset += xdma_calc_size(length, size_of_type); return array; }