pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/matrix-data.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/matrix-data.c
Date: Sat, 29 Oct 2005 01:50:08 -0400

Index: pspp/src/matrix-data.c
diff -u pspp/src/matrix-data.c:1.33 pspp/src/matrix-data.c:1.34
--- pspp/src/matrix-data.c:1.33 Wed Oct 26 05:06:14 2005
+++ pspp/src/matrix-data.c      Sat Oct 29 05:50:06 2005
@@ -1143,7 +1143,7 @@
   {
     int *cp;
 
-    nr->data = pool_alloc (mx->container, (PROX + 1) * sizeof *nr->data);
+    nr->data = pool_nalloc (mx->container, PROX + 1, sizeof *nr->data);
     
     {
       int i;
@@ -1166,12 +1166,12 @@
            int n_vectors = per_factor ? mx->cells : 1;
            int i;
            
-           nr->data[*cp] = pool_alloc (mx->container,
-                                      n_vectors * sizeof **nr->data);
+           nr->data[*cp] = pool_nalloc (mx->container,
+                                         n_vectors, sizeof **nr->data);
            
            for (i = 0; i < n_vectors; i++)
-             nr->data[*cp][i] = pool_alloc (mx->container,
-                                           n_entries * sizeof ***nr->data);
+             nr->data[*cp][i] = pool_nalloc (mx->container,
+                                              n_entries, sizeof ***nr->data);
          }
        }
   }
@@ -1836,8 +1836,8 @@
   {
     struct factor_data *new = pool_alloc (mx->container, sizeof *new);
 
-    new->factors = pool_alloc (mx->container,
-                               sizeof *new->factors * mx->n_factors);
+    new->factors = pool_nalloc (mx->container,
+                                mx->n_factors, sizeof *new->factors);
     
     {
       size_t i;
@@ -1888,8 +1888,8 @@
       if (type == 1)
        n_items *= mx->n_continuous;
       
-      c->data[wr->content] = pool_alloc (mx->container,
-                                       sizeof **c->data * n_items);
+      c->data[wr->content] = pool_nalloc (mx->container,
+                                          n_items, sizeof **c->data);
     }
 
   cp = &c->data[wr->content][n_rows * mx->n_continuous];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]