diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp --- a/src/core/alloc_func.hpp +++ b/src/core/alloc_func.hpp @@ -90,4 +90,7 @@ template FORCEINLINE T* Rea return t_ptr; } +/** alloca() has to be called in the parent function, so define AllocaM() as a macro */ +#define AllocaM(T, num_elements) ((T*)alloca((num_elements) * sizeof(T))) + #endif /* ALLOC_FUNC_HPP */