Get rid of malloc() and free() (PR#2549)

Just the minimal changes to qr_solve.cpp and .h to get rid of malloc() and free().

Saves about 656 bytes of progmem (library-code)
and 22 bytes for static variables.

Should use exactly the same amount of stack as it did before on the heap.
This commit is contained in:
AnHardt
2015-07-30 14:48:26 +02:00
committed by Richard Wackerbarth
parent f9195d114b
commit d03f037a92
3 changed files with 11 additions and 30 deletions

View File

@ -17,6 +17,6 @@ int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[],
double qy[], double qty[], double b[], double rsd[], double ab[], int job );
void dscal ( int n, double sa, double x[], int incx );
void dswap ( int n, double x[], int incx, double y[], int incy );
double *qr_solve ( int m, int n, double a[], double b[] );
void qr_solve ( double x[], int m, int n, double a[], double b[] );
#endif