Solve a system of linear equations many times without allocating memory

IIRC, the issue is that LAPACK’s factorization routines typically require some additional workspace vectors to be supplied, in addition to storage for the matrix itself, so these have to be allocated in lu!. To be completely allocation-free, the caller would need to pass an additional workspace parameter.

(Of course, you could always call the LAPACK routines directly from your Julia code and do whatever low-level hackery you want.)