]> henry.ined.fr Git - .git/commitdiff
Allocation bug
authorN. Brouard <brouard@ined.fr>
Tue, 19 Nov 2002 00:17:38 +0000 (00:17 +0000)
committerN. Brouard <brouard@ined.fr>
Tue, 19 Nov 2002 00:17:38 +0000 (00:17 +0000)
src/imach.c

index 458bb844935d3bf7925e2ca832b57a3f54015085..0855c36798b5701b0d2c772302f715019052f4a6 100644 (file)
@@ -3652,6 +3652,11 @@ int main(int argc, char *argv[])
   /* Calculates basic frequencies. Computes observed prevalence at single age
      and prints on file fileres'p'. */
 
+    pmmij= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
+    oldms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
+    newms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
+    savms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
+    oldm=oldms; newm=newms; savm=savms; /* Keeps fixed addresses to free */
     
    
   /* For Powell, parameters are in a vector p[] starting at p[1]
@@ -3884,11 +3889,6 @@ Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf<br>\n
   fprintf(ficrespl,"\n");
   
   prlim=matrix(1,nlstate,1,nlstate);
-  pmmij= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
-  oldms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
-  newms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
-  savms= matrix(1,nlstate+ndeath,1,nlstate+ndeath); /* creation */
-  oldm=oldms; newm=newms; savm=savms; /* Keeps fixed addresses to free */
 
   agebase=ageminpar;
   agelim=agemaxpar;