malloc avoided in accel function