Static versus dynamic memory allocation: a comparison for linear algebra kernels