fix compile errors when dynamic allocation is disabled
fix default parameters when dynamic allocation is disabled