add stack-allocated memory