Method and system memory allocation for real-time audio processing