--- src/SSL_gaussian.c 2020-05-18 10:38:25.000000000 +0800 +++ src/SSL_gaussian.c 2025-07-15 21:39:17.000000000 +0800 @@ -19,11 +19,11 @@ SEXP cleanupG(double *a, double *r, int *e1, int *e2, double *z, SEXP beta, SEXP loss, SEXP iter, SEXP thetas_export, SEXP sigmas_export) { - Free(a); - Free(r); - Free(e1); - Free(e2); - Free(z); + R_Free(a); + R_Free(r); + R_Free(e1); + R_Free(e2); + R_Free(z); SEXP res; PROTECT(res = allocVector(VECSXP, 5)); @@ -112,11 +112,11 @@ INTEGER(iter)[i] = 0; } - double *delta = Calloc(p, double); + double *delta = R_Calloc(p, double); // Beta from previous iteration - double *a = Calloc(p, double); - double *newa = Calloc(p, double); + double *a = R_Calloc(p, double); + double *newa = R_Calloc(p, double); for (int j = 0; j < p; j++) { a[j] = initialbeta[j]; @@ -125,22 +125,22 @@ // Index of an active set - int *e1 = Calloc(p, int); + int *e1 = R_Calloc(p, int); for (int j=0; j