gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master bafed2c 2/2: Function and variable name in gal


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master bafed2c 2/2: Function and variable name in gal_data_*alloc_array
Date: Thu, 18 May 2017 11:52:08 -0400 (EDT)

branch: master
commit bafed2c623ff061f1ff6ee584083ede6d6ed8a8b
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Function and variable name in gal_data_*alloc_array
    
    If there was a problem in the allocation, the two `gal_data_malloc_arary'
    and `gal_data_calloc_arary' functions would just abort with the size of the
    necessary space. But that was not very useful: which function needed this
    space? For which variable?
    
    So with this commit, these two functions now have two extra arguments (that
    may be NULL). These represent the function and variable names. When there
    is an allocation error, these names will be used in the error message to
    help in identifying exactly which step of a program confronted this issue.
---
 bin/buildprog/buildprog.c      |  2 +-
 bin/convertt/eps.c             |  3 ++-
 bin/convolve/convolve.c        |  9 ++++++---
 bin/crop/onecrop.c             |  4 ++--
 bin/crop/wcsmode.c             | 11 +++++-----
 bin/fits/fits.c                |  2 +-
 bin/mkcatalog/columns.c        | 42 +++++++++++++++++++++++++-------------
 bin/mkcatalog/mkcatalog.c      | 19 +++++++++--------
 bin/mkcatalog/ui.c             |  6 ++++--
 bin/mkcatalog/upperlimit.c     |  9 ++++++---
 bin/mkprof/oneprofile.c        |  2 +-
 bin/mkprof/ui.c                |  2 +-
 bin/noisechisel/clumps.c       | 27 ++++++++++++++++---------
 bin/noisechisel/detection.c    | 27 ++++++++++++++++---------
 bin/noisechisel/segmentation.c |  9 ++++++---
 bin/noisechisel/threshold.c    |  3 ++-
 bin/noisechisel/ui.c           |  6 ++++--
 bin/warp/ui.c                  |  8 +++++---
 doc/gnuastro.texi              | 21 ++++++++++++-------
 lib/arithmetic.c               |  4 ++--
 lib/binary.c                   |  6 ++++--
 lib/blank.c                    |  2 +-
 lib/convolve.c                 | 18 ++++++++++++-----
 lib/data.c                     | 36 ++++++++++++++++++++++++---------
 lib/dimension.c                |  2 +-
 lib/fits.c                     | 17 ++++++++++------
 lib/gnuastro/data.h            |  6 ++++--
 lib/interpolate.c              | 15 +++++++++-----
 lib/list.c                     |  8 ++++----
 lib/options.c                  |  2 +-
 lib/permutation.c              |  6 +++---
 lib/tableintern.c              |  3 ++-
 lib/tile.c                     | 46 +++++++++++++++++++++++++++---------------
 lib/type.c                     |  6 +++---
 lib/wcs.c                      | 43 +++++++++++++++++++++++----------------
 35 files changed, 278 insertions(+), 154 deletions(-)

diff --git a/bin/buildprog/buildprog.c b/bin/buildprog/buildprog.c
index 407f726..13673e1 100644
--- a/bin/buildprog/buildprog.c
+++ b/bin/buildprog/buildprog.c
@@ -48,7 +48,7 @@ buildprog_as_one_string(char *opt, gal_list_str_t *list)
         len += 1 + (opt ? strlen(opt) : 0) + strlen(tmp->v);
 
       /* Allocate space for the string. */
-      out=gal_data_malloc_array(GAL_TYPE_UINT8, len+1);
+      out=gal_data_malloc_array(GAL_TYPE_UINT8, len+1, __func__, "out");
 
       /* Write all the strings into the allocated space. */
       len=0;
diff --git a/bin/convertt/eps.c b/bin/convertt/eps.c
index 4108c68..3b3d06f 100644
--- a/bin/convertt/eps.c
+++ b/bin/convertt/eps.c
@@ -198,7 +198,8 @@ eps_convert_to_bitstream(struct converttparams *p)
   for(channel=p->chll; channel!=NULL; channel=channel->next)
     {
       /* Allocate the array. */
-      bits=gal_data_malloc_array(GAL_TYPE_UINT8, bytesinimg);
+      bits=gal_data_malloc_array(GAL_TYPE_UINT8, bytesinimg, __func__,
+                                 "bits");
 
       /* Put the values in. */
       in=channel->array;
diff --git a/bin/convolve/convolve.c b/bin/convolve/convolve.c
index 9e7030a..323a725 100644
--- a/bin/convolve/convolve.c
+++ b/bin/convolve/convolve.c
@@ -58,7 +58,8 @@ complextoreal(double *c, size_t size, int action, double 
**output)
   double *out, *o, *of;
 
   /* Allocate the space for the real array. */
-  *output=out=gal_data_malloc_array(GAL_TYPE_FLOAT64, size);
+  *output=out=gal_data_malloc_array(GAL_TYPE_FLOAT64, size, __func__,
+                                    "output");
 
   /* Fill the real array with the derived value from the complex array. */
   of=(o=out)+size;
@@ -206,7 +207,8 @@ frequency_make_padded_complex(struct convolveparams *p)
 
 
   /* Allocate the space for the padded input image and fill it. */
-  pimg=p->pimg=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*ps0*ps1);
+  pimg=p->pimg=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*ps0*ps1, __func__,
+                                     "pimg");
   for(i=0;i<ps0;++i)
     {
       op=(o=pimg+i*2*ps1)+2*ps1; /* pimg is complex.            */
@@ -220,7 +222,8 @@ frequency_make_padded_complex(struct convolveparams *p)
 
 
   /* Allocate the space for the padded Kernel and fill it. */
-  pker=p->pker=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*ps0*ps1);
+  pker=p->pker=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*ps0*ps1, __func__,
+                                     "pker");
   for(i=0;i<ps0;++i)
     {
       op=(o=pker+i*2*ps1)+2*ps1; /* pker is complex.            */
diff --git a/bin/crop/onecrop.c b/bin/crop/onecrop.c
index 735d011..cb26620 100644
--- a/bin/crop/onecrop.c
+++ b/bin/crop/onecrop.c
@@ -723,7 +723,7 @@ onecrop(struct onecropparams *crp)
          array. */
       status=0;
       cropsize=(lpixel_i[0]-fpixel_i[0]+1)*(lpixel_i[1]-fpixel_i[1]+1);
-      array=gal_data_malloc_array(p->type, cropsize);
+      array=gal_data_malloc_array(p->type, cropsize, __func__, "array");
       if(fits_read_subset(ifp, gal_fits_type_to_datatype(p->type),
                           fpixel_i, lpixel_i, inc, p->bitnul, array,
                           &anynul, &status))
@@ -843,7 +843,7 @@ iscenterfilled(struct onecropparams *crp)
   */
 
   /* Allocate the array and read in the pixels. */
-  array=gal_data_malloc_array(type, size);
+  array=gal_data_malloc_array(type, size, __func__, "array");
   if( fits_read_subset(ofp, gal_fits_type_to_datatype(type), fpixel, lpixel,
                        inc, p->bitnul, array, &anynul, &status) )
     gal_fits_io_error(status, NULL);
diff --git a/bin/crop/wcsmode.c b/bin/crop/wcsmode.c
index 3d7a264..34179a9 100644
--- a/bin/crop/wcsmode.c
+++ b/bin/crop/wcsmode.c
@@ -303,11 +303,12 @@ fillcrpipolygon(struct onecropparams *crp)
   struct cropparams *p=crp->p;
 
   /* Allocate the necessary arrays. */
-  x=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices);
-  y=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices);
-  ra=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices);
-  dec=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices);
-  crp->ipolygon=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*p->nvertices);
+  x=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices, __func__, "x");
+  y=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices, __func__, "y");
+  ra=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices, __func__, "ra");
+  dec=gal_data_calloc_array(GAL_TYPE_FLOAT64, p->nvertices, __func__, "dec");
+  crp->ipolygon=gal_data_malloc_array(GAL_TYPE_FLOAT64, 2*p->nvertices,
+                                      __func__, "crp->ipolygon");
 
   /* Fill in the RA and Dec columns. */
   for(i=0;i<p->nvertices;++i)
diff --git a/bin/fits/fits.c b/bin/fits/fits.c
index 1d3d649..4045b5c 100644
--- a/bin/fits/fits.c
+++ b/bin/fits/fits.c
@@ -146,7 +146,7 @@ fits_print_extension_info(struct fitsparams *p)
         case BINARY_TBL:
           ndim=2;
           tstr = hdutype==ASCII_TBL ? "table_ascii" : "table_binary";
-          dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 2);
+          dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 2, __func__, "dsize");
           gal_fits_tab_size(fptr, dsize+1, dsize);
           break;
 
diff --git a/bin/mkcatalog/columns.c b/bin/mkcatalog/columns.c
index 6eabcc6..e9230ae 100644
--- a/bin/mkcatalog/columns.c
+++ b/bin/mkcatalog/columns.c
@@ -62,8 +62,10 @@ columns_alloc_radec(struct mkcatalogparams *p)
               __func__, p->input->ndim * sizeof *p->rd_vo );
 
       /* Space for each dimension. */
-      p->rd_vo[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
-      p->rd_vo[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
+      p->rd_vo[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                          __func__, "p->rd_vo[0]");
+      p->rd_vo[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                          __func__, "p->rd_vo[1]");
       if(p->clumps)
         {
           /* Allocate the space for all dimensions. */
@@ -74,8 +76,10 @@ columns_alloc_radec(struct mkcatalogparams *p)
                   __func__, p->input->ndim * sizeof *p->rd_vc );
 
           /* Space for each dimension. */
-          p->rd_vc[0]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps);
-          p->rd_vc[1]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps);
+          p->rd_vc[0]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps,
+                                            __func__, "p->rd_vc[0]");
+          p->rd_vc[1]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps,
+                                            __func__, "p->rd_vc[0]");
         }
     }
 }
@@ -98,8 +102,10 @@ columns_alloc_georadec(struct mkcatalogparams *p)
               __func__, p->input->ndim * sizeof *p->rd_go );
 
       /* Space for each dimension. */
-      p->rd_go[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
-      p->rd_go[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
+      p->rd_go[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                          __func__, "p->rd_go[0]");
+      p->rd_go[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                          __func__, "p->rd_go[1]");
       if(p->clumps)
         {
           /* Allocate the space for all dimensions. */
@@ -110,8 +116,10 @@ columns_alloc_georadec(struct mkcatalogparams *p)
                   __func__, p->input->ndim * sizeof *p->rd_gc );
 
           /* Space for each dimension. */
-          p->rd_gc[0]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps);
-          p->rd_gc[1]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps);
+          p->rd_gc[0]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps,
+                                            __func__, "p->rd_gc[0]");
+          p->rd_gc[1]=gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numclumps,
+                                            __func__, "p->rd_vc[1]");
         }
     }
 }
@@ -134,8 +142,10 @@ columns_alloc_clumpsradec(struct mkcatalogparams *p)
               __func__, p->input->ndim * sizeof *p->rd_vcc );
 
       /* Space for each dimension. */
-      p->rd_vcc[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
-      p->rd_vcc[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
+      p->rd_vcc[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                           __func__, "p->rd_vcc[0]");
+      p->rd_vcc[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                           __func__, "p->rd_vcc[1]");
     }
 }
 
@@ -157,8 +167,10 @@ columns_alloc_clumpsgeoradec(struct mkcatalogparams *p)
               __func__, p->input->ndim * sizeof *p->rd_gcc );
 
       /* Space for each dimension. */
-      p->rd_gcc[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
-      p->rd_gcc[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects);
+      p->rd_gcc[0] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                           __func__, "p->rd_gcc[0]");
+      p->rd_gcc[1] = gal_data_malloc_array(GAL_TYPE_FLOAT64, p->numobjects,
+                                           __func__, "p->rd_gcc[1]");
     }
 }
 
@@ -200,8 +212,10 @@ columns_define_alloc(struct mkcatalogparams *p)
      smaller domain of raw measurements. So to avoid having to calculate
      something multiple times, each parameter will flag the intermediate
      parameters it requires in these arrays. */
-  oiflag = p->oiflag = gal_data_malloc_array(GAL_TYPE_UINT8, OCOL_NUMCOLS);
-  ciflag = p->ciflag = gal_data_malloc_array(GAL_TYPE_UINT8, CCOL_NUMCOLS);
+  oiflag = p->oiflag = gal_data_malloc_array(GAL_TYPE_UINT8, OCOL_NUMCOLS,
+                                             __func__, "oiflag");
+  ciflag = p->ciflag = gal_data_malloc_array(GAL_TYPE_UINT8, CCOL_NUMCOLS,
+                                             __func__, "ciflag");
 
   /* Allocate the columns. */
   for(colcode=p->columnids; colcode!=NULL; colcode=colcode->next)
diff --git a/bin/mkcatalog/mkcatalog.c b/bin/mkcatalog/mkcatalog.c
index 1e2b57d..926079d 100644
--- a/bin/mkcatalog/mkcatalog.c
+++ b/bin/mkcatalog/mkcatalog.c
@@ -124,8 +124,8 @@ mkcatalog_first_pass(struct mkcatalog_passparams *pp)
   int32_t *O, *C=NULL;
   size_t d, increment=0, num_increment=1;
   float ss, *I, *II, *SK, *ST, *input=p->input->array;
-  size_t *c=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  size_t *sc=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *c=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "c");
+  size_t *sc=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "sc");
 
 
   /* Parse each contiguous patch of memory covered by this object. */
@@ -262,12 +262,12 @@ mkcatalog_second_pass(struct mkcatalog_passparams *pp)
   size_t nngb=gal_dimension_num_neighbors(ndim);
   size_t *dinc=gal_dimension_increment(ndim, dsize);
   float ss, *I, *II, *SK, *ST, *input=p->input->array;
-  size_t *c=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  size_t *sc=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
   int32_t *objects=p->objects->array, *clumps=p->clumps->array;
+  size_t *c=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "c");
+  size_t *sc=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "sc");
 
   /* Allocate array to keep the neighbor labels. */
-  ngblabs=gal_data_malloc_array(GAL_TYPE_INT32, nngb);
+  ngblabs=gal_data_malloc_array(GAL_TYPE_INT32, nngb, __func__, "ngblabs");
 
   /* Parse each contiguous patch of memory covered by this object. */
   while( pp->start_end_inc[0] + increment <= pp->start_end_inc[1] )
@@ -464,8 +464,10 @@ mkcatalog_single_object(void *in_prm)
   pp.p               = p;
   pp.clumpstartindex = 0;
   pp.rng             = p->rng ? gsl_rng_clone(p->rng) : NULL;
-  pp.shift           = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  pp.oi              = gal_data_malloc_array(GAL_TYPE_FLOAT64, OCOL_NUMCOLS);
+  pp.shift           = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                             "pp.shift");
+  pp.oi              = gal_data_malloc_array(GAL_TYPE_FLOAT64, OCOL_NUMCOLS,
+                                             __func__, "pp.oi");
 
   /* If we have upper-limit mode, then allocate the container to keep the
      values to calculate the standard deviation. */
@@ -495,7 +497,8 @@ mkcatalog_single_object(void *in_prm)
         {
           /* Allocate space for the properties of each clump. */
           pp.ci = gal_data_calloc_array(GAL_TYPE_FLOAT64,
-                                        pp.clumpsinobj * CCOL_NUMCOLS);
+                                        pp.clumpsinobj * CCOL_NUMCOLS,
+                                        __func__, "pp.ci");
 
           /* Get the starting row of this object's clumps in the final
              catalog. This index is also necessary for the unique random
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 9332532..c9f982e 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -624,9 +624,11 @@ ui_one_tile_per_object(struct mkcatalogparams *p)
 
   int32_t *l, *lf, *start;
   size_t i, d, *min, *max, width=2*ndim;
-  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
   size_t *minmax=gal_data_malloc_array(GAL_TYPE_SIZE_T,
-                                       width*p->numobjects);
+                                       width*p->numobjects, __func__,
+                                       "minmax");
+  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                      "coord");
 
 
   /* Initialize the minimum and maximum position for each tile/object. So,
diff --git a/bin/mkcatalog/upperlimit.c b/bin/mkcatalog/upperlimit.c
index 095ff1a..0068b8f 100644
--- a/bin/mkcatalog/upperlimit.c
+++ b/bin/mkcatalog/upperlimit.c
@@ -52,9 +52,11 @@ upperlimit_make_clump_tiles(struct mkcatalog_passparams *pp)
   float *I, *II, *start=input->array;
   size_t increment=0, num_increment=1;
   size_t i, d, *min, *max, width=2*ndim;
-  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                      "coord");
   size_t *minmax=gal_data_malloc_array(GAL_TYPE_SIZE_T,
-                                       width*pp->clumpsinobj);
+                                       width*pp->clumpsinobj, __func__,
+                                       "minmax");
 
   /* Initialize the minimum and maximum position for each tile/clump. So,
      we'll initialize the minimum coordinates to the maximum possible
@@ -160,8 +162,9 @@ upperlimit_one_tile(struct mkcatalog_passparams *pp, 
gal_data_t *tile,
   float *I, *II, *SK, *st_i, *st_sky;
   size_t d, tcounter=0, counter=0, se_inc[2];
   int32_t *O, *oO, *st_o, *st_oo, *st_oc, *oC=NULL;
-  size_t *rcoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
   size_t maxcount = p->upnum * MKCATALOG_UPPERLIMIT_STOP_MULTIP;
+  size_t *rcoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "rcoord");
 
   /* Initializations. */
   tarray=tile->array;
diff --git a/bin/mkprof/oneprofile.c b/bin/mkprof/oneprofile.c
index 682d66a..bf275c7 100644
--- a/bin/mkprof/oneprofile.c
+++ b/bin/mkprof/oneprofile.c
@@ -253,7 +253,7 @@ makepixbypix(struct mkonthread *mkp)
     { img[p]=1; return; }
 
   /* Allocate the byt array to not repeat completed pixels. */
-  byt = gal_data_calloc_array(GAL_TYPE_UINT8, is0*is1);
+  byt = gal_data_calloc_array(GAL_TYPE_UINT8, is0*is1, __func__, "byt");
 
   /* Start the queue: */
   byt[p]=1;
diff --git a/bin/mkprof/ui.c b/bin/mkprof/ui.c
index 4687ecf..25b622a 100644
--- a/bin/mkprof/ui.c
+++ b/bin/mkprof/ui.c
@@ -337,7 +337,7 @@ ui_read_profile_function(struct mkprofparams *p, char 
**strarr)
 {
   size_t i;
 
-  p->f=gal_data_malloc_array(GAL_TYPE_INT32, p->num);
+  p->f=gal_data_malloc_array(GAL_TYPE_INT32, p->num, __func__, "p->f");
   for(i=0;i<p->num;++i)
     {
       if( !strcmp("sersic", strarr[i]) )
diff --git a/bin/noisechisel/clumps.c b/bin/noisechisel/clumps.c
index 1a671a3..03b076e 100644
--- a/bin/noisechisel/clumps.c
+++ b/bin/noisechisel/clumps.c
@@ -704,7 +704,7 @@ clumps_get_raw_info(struct clumps_thread_params *cltprm)
   int32_t lab, nlab, *ngblabs, *clabel=p->clabel->array;
 
   /* Allocate the array to keep the neighbor labels of river pixels. */
-  ngblabs=gal_data_malloc_array(GAL_TYPE_INT32, nngb);
+  ngblabs=gal_data_malloc_array(GAL_TYPE_INT32, nngb, __func__, "ngblabs");
 
   /* Go over all the pixels in this region. */
   af=(a=cltprm->indexs->array)+cltprm->indexs->size;
@@ -824,18 +824,23 @@ clumps_make_sn_table(struct clumps_thread_params *cltprm)
   cltprm->sn        = &cltprm->clprm->sn[ cltprm->id ];
   cltprm->sn->ndim  = 1;                        /* Depends on `cltprm->sn' */
   cltprm->sn->type  = GAL_TYPE_FLOAT32;
-  cltprm->sn->dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, 1);
-  cltprm->sn->array = gal_data_malloc_array(cltprm->sn->type, tablen);
+  cltprm->sn->dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, 1, __func__,
+                                            "cltprm->sn->dsize");
+  cltprm->sn->array = gal_data_malloc_array(cltprm->sn->type, tablen,
+                                            __func__, "cltprm->sn->array");
   cltprm->sn->size  = cltprm->sn->dsize[0] = tablen;       /* After dsize. */
   if( cltprm->clprm->snind )
     {
       cltprm->snind        = &cltprm->clprm->snind [ cltprm->id ];
       cltprm->snind->ndim  = 1;              /* Depends on `cltprm->snind' */
       cltprm->snind->type  = GAL_TYPE_INT32;
-      cltprm->snind->dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, 1);
+      cltprm->snind->dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, 1,
+                                                   __func__,
+                                                   "cltprm->snind->dsize");
       cltprm->snind->size  = cltprm->snind->dsize[0]=tablen;/* After dsize */
       cltprm->snind->array = gal_data_malloc_array(cltprm->snind->type,
-                                                   tablen);
+                                                   tablen, __func__,
+                                                   "cltprm->snind->array");
     }
   else cltprm->snind=NULL;
 
@@ -989,8 +994,10 @@ clumps_find_make_sn_table(void *in_prm)
   uint8_t *binary=p->binary->array;
   struct clumps_thread_params cltprm;
   size_t i, c, ind, tind, num, numsky, *indarr;
-  size_t *scoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  size_t *icoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *scoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "scoord");
+  size_t *icoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "icoord");
 
 
   /* Initialize the parameters for this thread. */
@@ -1372,7 +1379,8 @@ clumps_det_label_indexs(struct noisechiselparams *p)
 
   /* Find the area in each detected objects (to see how much space we need
      to allocate). */
-  areas=gal_data_calloc_array(GAL_TYPE_SIZE_T, p->numdetections+1);
+  areas=gal_data_calloc_array(GAL_TYPE_SIZE_T, p->numdetections+1, __func__,
+                              "areas");
   if(p->input->flag & GAL_DATA_FLAG_HASBLANK)
     {
       lf=(l=p->olabel->array)+p->olabel->size; /* Blank pixels have a      */
@@ -1429,7 +1437,8 @@ clumps_det_keep_true_relabel(struct clumps_thread_params 
*cltprm)
   int32_t *l, *lf, curlab=1, *clabel=p->clabel->array;
   size_t i, *dinc=gal_dimension_increment(ndim, dsize);
   int32_t *newlabs=gal_data_malloc_array(GAL_TYPE_INT32,
-                                         cltprm->numinitclumps+1);
+                                         cltprm->numinitclumps+1, __func__,
+                                         "newlabs");
 
   /* Initialize the new labels with CLUMPS_INIT (so the diffuse area can be
      distinguished from the clumps). */
diff --git a/bin/noisechisel/detection.c b/bin/noisechisel/detection.c
index 4a4f68b..b302b64 100644
--- a/bin/noisechisel/detection.c
+++ b/bin/noisechisel/detection.c
@@ -302,7 +302,8 @@ detection_pseudo_find(struct noisechiselparams *p, 
gal_data_t *workbin,
      to store all tiles. Finally, since we are working on a `uint8_t' type,
      the size of each element is only 1 byte. */
   fho_prm.copyspace=gal_data_malloc_array(GAL_TYPE_UINT8,
-                                          p->cp.numthreads*p->maxltcontig);
+                                          p->cp.numthreads*p->maxltcontig,
+                                          __func__, "fho_prm.copyspace");
 
 
   /* Fill the holes and open on each large tile. When no check image is
@@ -441,9 +442,10 @@ detection_sn(struct noisechiselparams *p, gal_data_t 
*worklab, size_t num,
   double ave, err, *xy, *brightness;
   size_t ind, ndim=p->input->ndim, xyncols=1+ndim;
   size_t i, *area, counter=0, *dsize=p->input->dsize;
-  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
   float *img=p->input->array, *f=p->input->array, *ff=f+p->input->size;
   int32_t *plab = worklab->array, *dlab = s0d1D2 ? NULL : p->olabel->array;
+  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                      "coord");
 
 
   /* Sanity check. */
@@ -462,11 +464,15 @@ detection_sn(struct noisechiselparams *p, gal_data_t 
*worklab, size_t num,
   /* Allocate all the necessary arrays, note that since we want to put each
      object's information into the same index, the number of allocated
      spaces has to be `tablen=num+1'. */
-  area       = gal_data_calloc_array(GAL_TYPE_SIZE_T,  tablen          );
-  brightness = gal_data_calloc_array(GAL_TYPE_FLOAT64, tablen          );
-  xy         = gal_data_calloc_array(GAL_TYPE_FLOAT64, xyncols*tablen  );
+  area       = gal_data_calloc_array(GAL_TYPE_SIZE_T,  tablen, __func__,
+                                     "area");
+  brightness = gal_data_calloc_array(GAL_TYPE_FLOAT64, tablen, __func__,
+                                     "brightness");
+  xy         = gal_data_calloc_array(GAL_TYPE_FLOAT64, xyncols*tablen,
+                                     __func__, "xy");
   flag       = ( s0d1D2==0
-                 ? gal_data_calloc_array(GAL_TYPE_UINT8, tablen)
+                 ? gal_data_calloc_array(GAL_TYPE_UINT8, tablen, __func__,
+                                         "flag")
                  : NULL );
   sn         = gal_data_alloc(NULL, GAL_TYPE_FLOAT32, 1, &tablen, NULL, 1,
                               p->cp.minmapsize, "SIGNAL-TO-NOISE", "ratio",
@@ -629,7 +635,8 @@ detection_pseudo_remove_low_sn(struct noisechiselparams *p,
   float *snarr=sn->array;
   uint8_t *b=workbin->array;
   int32_t *l=worklab->array, *lf=l+worklab->size;
-  uint8_t *keep=gal_data_calloc_array(GAL_TYPE_UINT8, sn->size);
+  uint8_t *keep=gal_data_calloc_array(GAL_TYPE_UINT8, sn->size, __func__,
+                                      "keep");
 
   /* Specify the new labels for those that must be kept/changed. Note that
      when an object didn't have an S/N, its S/N was given a value of NaN
@@ -734,7 +741,8 @@ detection_final_remove_small_sn(struct noisechiselparams 
*p, size_t num)
   gal_data_t *sn, *snind;
   int32_t *l, *lf, curlab=1;
   gal_list_str_t *comments=NULL;
-  int32_t *newlabs=gal_data_calloc_array(GAL_TYPE_INT32, num+1);
+  int32_t *newlabs=gal_data_calloc_array(GAL_TYPE_INT32, num+1, __func__,
+                                         "newlabs");
 
 
   /* Get the Signal to noise ratio of all detections. */
@@ -834,7 +842,8 @@ detection_remove_false_initial(struct noisechiselparams *p,
   uint8_t *b=workbin->array;
   int32_t *l=p->olabel->array, *lf=l+p->olabel->size, curlab=1;
   int32_t *newlabels=gal_data_calloc_array(GAL_TYPE_UINT32,
-                                            p->numinitialdets+1);
+                                           p->numinitialdets+1, __func__,
+                                           "newlabels");
 
 
   /* Find the new labels for all the existing labels. Recall that
diff --git a/bin/noisechisel/segmentation.c b/bin/noisechisel/segmentation.c
index ddba01d..26db7be 100644
--- a/bin/noisechisel/segmentation.c
+++ b/bin/noisechisel/segmentation.c
@@ -96,8 +96,9 @@ segmentation_relab_to_objects(struct clumps_thread_params 
*cltprm)
   size_t *dinc=gal_dimension_increment(ndim, dsize);
   size_t *s, *sf, i, j, ii, rpnum, *nums=nums_d->array;
   double ave, rpsum, c=sqrt(1/p->cpscorr), *sums=sums_d->array;
-  int32_t *ngblabs=gal_data_malloc_array(GAL_TYPE_UINT32, nngb);
   double err=cltprm->std*cltprm->std*(p->skysubtracted?1.0f:2.0f);
+  int32_t *ngblabs=gal_data_malloc_array(GAL_TYPE_UINT32, nngb, __func__,
+                                         "ngblabs");
 
 
   /* Go over all the still-unlabeled pixels and see which labels they
@@ -259,8 +260,10 @@ segmentation_relab_clumps_in_objects(struct 
clumps_thread_params *cltprm)
   int32_t *clumptoobj=cltprm->clumptoobj->array;
   int32_t *clabel=cltprm->clprm->p->clabel->array;
   size_t i, *s=cltprm->indexs->array, *sf=s+cltprm->indexs->size;
-  size_t *nclumpsinobj=gal_data_calloc_array(GAL_TYPE_SIZE_T, numobjects+1);
-  int32_t *newlabs=gal_data_calloc_array(GAL_TYPE_UINT32, numtrueclumps+1);
+  size_t *nclumpsinobj=gal_data_calloc_array(GAL_TYPE_SIZE_T, numobjects+1,
+                                             __func__, "nclumpsinobj");
+  int32_t *newlabs=gal_data_calloc_array(GAL_TYPE_UINT32, numtrueclumps+1,
+                                         __func__, "newlabs");
 
   /* Fill both arrays. */
   for(i=1;i<numtrueclumps+1;++i)
diff --git a/bin/noisechisel/threshold.c b/bin/noisechisel/threshold.c
index 55bc66c..9c27c60 100644
--- a/bin/noisechisel/threshold.c
+++ b/bin/noisechisel/threshold.c
@@ -471,7 +471,8 @@ threshold_quantile_find_apply(struct noisechiselparams *p)
 
   /* Allocate temporary space for processing in each tile. */
   qprm.usage=gal_data_malloc_array(p->input->type,
-                                   cp->numthreads * p->maxtcontig);
+                                   cp->numthreads * p->maxtcontig,
+                                   __func__, "qprm.usage");
 
 
   /* Find the threshold on each tile, free the temporary processing space
diff --git a/bin/noisechisel/ui.c b/bin/noisechisel/ui.c
index 1559089..8601cd0 100644
--- a/bin/noisechisel/ui.c
+++ b/bin/noisechisel/ui.c
@@ -481,7 +481,8 @@ ui_prepare_tiles(struct noisechiselparams *p)
   /* Check the tile parameters for the small tile sizes and make the tile
      structure. We will also need the dimensions of the tile with the
      maximum required memory. */
-  p->maxtsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, p->input->ndim);
+  p->maxtsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, p->input->ndim,
+                                    __func__, "p->maxtsize");
   gal_tile_full_sanity_check(p->inputname, p->cp.hdu, p->input, tl);
   gal_tile_full_two_layers(p->input, tl);
   gal_tile_full_permutation(tl);
@@ -500,7 +501,8 @@ ui_prepare_tiles(struct noisechiselparams *p)
   ltl->workoverch     = tl->workoverch;
   ltl->checktiles     = tl->checktiles;
   ltl->oneelempertile = tl->oneelempertile;
-  p->maxltsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, p->input->ndim);
+  p->maxltsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, p->input->ndim,
+                                     __func__, "p->maxltsize");
   gal_tile_full_sanity_check(p->inputname, p->cp.hdu, p->input, ltl);
   gal_tile_full_two_layers(p->input, ltl);
   gal_tile_full_permutation(ltl);
diff --git a/bin/warp/ui.c b/bin/warp/ui.c
index 035e25c..2f7758a 100644
--- a/bin/warp/ui.c
+++ b/bin/warp/ui.c
@@ -416,7 +416,7 @@ ui_matrix_prepare_raw(struct warpparams *p)
   if(p->matrix->size==4)
     {
       /* Allocate the final matrix. */
-      final=gal_data_malloc_array(GAL_TYPE_FLOAT64, 9);
+      final=gal_data_malloc_array(GAL_TYPE_FLOAT64, 9, __func__, "final");
 
       /* Fill in the final 3x3 matrix from the 2x2 matrix. */
       final[0]=in[0];    final[1]=in[1];   final[2]=0.0f;
@@ -432,7 +432,8 @@ ui_matrix_prepare_raw(struct warpparams *p)
   /* Correct the dimensional information, because the matrix was read as a
      single dimensional list of numbers. */
   free(p->matrix->dsize);
-  dsize=p->matrix->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 2);
+  dsize=p->matrix->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 2, __func__,
+                                               "dsize");
   dsize[0]=dsize[1]=3;
   p->matrix->ndim=2;
 }
@@ -763,7 +764,8 @@ ui_matrix_finalize(struct warpparams *p)
      yet implemented. */
 
    /* Make the inverse matrix: */
-  inv=p->inverse=gal_data_malloc_array(GAL_TYPE_FLOAT64, 9);
+  inv=p->inverse=gal_data_malloc_array(GAL_TYPE_FLOAT64, 9, __func__,
+                                       "p->inverse");
   inv[0] = d[4]*d[8] - d[5]*d[7];
   inv[1] = d[2]*d[7] - d[1]*d[8];
   inv[2] = d[1]*d[5] - d[2]*d[4];
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 52f00de..8a754e1 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -17829,20 +17829,27 @@ assuming each element has a type defined by 
@code{type} (for the type
 codes, see @ref{Library data types}).
 @end deftypefun
 
address@hidden {void *} gal_data_malloc_array (uint8_t @code{type}, size_t 
@code{size})
address@hidden {void *} gal_data_malloc_array (uint8_t @code{type}, size_t 
@code{size}, const char @code{*funcname}, const char @code{*varname})
 Allocate an array of type @code{type} with @code{size} elements in RAM (for
 the type codes, see @ref{Library data types}). This is effectively just a
 wrapper around C's @code{malloc} function but takes Gnuastro's integer type
 codes and will also abort with an error if there the allocation was not
 successful.
+
address@hidden C99
+When space cannot be allocated, this function will abort the program with a
+message containing the reason for the failure. @code{funcname} (name of the
+function calling this function) and @code{varname} (name of variable that
+needs this space) will be used in this error message if they are not
address@hidden In most modern compilers, you can use the generic
address@hidden variable for @code{funcname}. In this way, you don't have
+to manually copy and paste the function name or worry about it changing
+later (@code{__func__} was standardized in C99).
 @end deftypefun
 
address@hidden {void *} gal_data_calloc_array (uint8_t @code{type}, size_t 
@code{size})
-Allocate and clear (initialize to zero) an array of type @code{type} with
address@hidden elements in RAM (for the type codes, see @ref{Library data
-types}). This is effectively just a wrapper around C's @code{calloc}
-function but takes Gnuastro's integer type codes and will also abort with
-an error if there the allocation was not successful.
address@hidden {void *} gal_data_calloc_array (uint8_t @code{type}, size_t 
@code{size)}, const char @code{*funcname}, const char @code{*varname})
+Similar to @code{gal_data_malloc_array}, but the space is cleared (set to
+0) after allocation.
 @end deftypefun
 
 @deftypefun void gal_data_initialize (gal_data_t @code{*data}, void 
@code{*array}, uint8_t @code{type}, size_t @code{ndim}, size_t @code{*dsize}, 
struct wcsprm @code{*wcs}, int @code{clear}, size_t @code{minmapsize}, char 
@code{*name}, char @code{*unit}, char @code{*comment})
diff --git a/lib/arithmetic.c b/lib/arithmetic.c
index 363ff0b..7fe313b 100644
--- a/lib/arithmetic.c
+++ b/lib/arithmetic.c
@@ -833,7 +833,7 @@ arithmetic_where(unsigned char flags, gal_data_t *out, 
gal_data_t *cond,
 
 #define MULTIOPERAND_MEDIAN(TYPE, QSORT_F) {                            \
     int n, use;                                                         \
-    TYPE *pixs=gal_data_malloc_array(list->type, dnum);                 \
+    TYPE *pixs=gal_data_malloc_array(list->type, dnum, __func__, "pixs"); \
                                                                         \
     /* Loop over each pixel */                                          \
     do                                                                  \
@@ -981,7 +981,7 @@ arithmetic_multioperand(int operator, unsigned char flags, 
gal_data_t *list)
 
   /* hasblank is used to see if a blank value should be checked for each
      list element or not. */
-  hasblank=gal_data_malloc_array(GAL_TYPE_UINT8, dnum);
+  hasblank=gal_data_malloc_array(GAL_TYPE_UINT8, dnum, __func__, "hasblank");
   for(tmp=list;tmp!=NULL;tmp=tmp->next)
     hasblank[i++]=gal_blank_present(tmp, 0);
 
diff --git a/lib/binary.c b/lib/binary.c
index 63aa7dd..a1adfaf 100644
--- a/lib/binary.c
+++ b/lib/binary.c
@@ -561,8 +561,10 @@ binary_make_padded_inverse(gal_data_t *input, gal_data_t 
**outtile)
   uint8_t *in;
   size_t i, startind;
   gal_data_t *inv, *tile;
-  size_t *dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
-  size_t *startcoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
+  size_t *startcoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim,
+                                           __func__, "startcoord");
+  size_t *dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim, __func__,
+                                      "dsize");
 
 
   /* Set the size of the padded inverse image and the coordinates of the
diff --git a/lib/blank.c b/lib/blank.c
index 16153cb..487f77f 100644
--- a/lib/blank.c
+++ b/lib/blank.c
@@ -87,7 +87,7 @@ gal_blank_alloc_write(uint8_t type)
   void *out;
 
   /* Allocate the space to keep the blank value. */
-  out=gal_data_malloc_array(type, 1);
+  out=gal_data_malloc_array(type, 1, __func__, "out");
 
   /* Put the blank value in the allcated space. */
   gal_blank_write(out, type);
diff --git a/lib/convolve.c b/lib/convolve.c
index 608c005..847671b 100644
--- a/lib/convolve.c
+++ b/lib/convolve.c
@@ -457,8 +457,10 @@ convolve_spatial_on_thread(void *inparam)
   gal_data_t *block=cprm->block;
 
   size_t i;
+  size_t ndim=block->ndim;
   struct per_thread_spatial_prm *pprm=&cprm->pprm[tprm->id];
-  size_t ndim=block->ndim, *dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T,ndim);
+  size_t *dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T,ndim, __func__,
+                                      "dsize");
 
 
   /* Set all dsize values to 1 (the values within `overlap->dsize' will be
@@ -468,10 +470,16 @@ convolve_spatial_on_thread(void *inparam)
 
   /* Initialize/Allocate necessary items for this thread. */
   pprm->cprm           = cprm;
-  pprm->pix            = gal_data_malloc_array(GAL_TYPE_SIZE_T, 2*ndim);
-  pprm->host_start     = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  pprm->kernel_start   = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  pprm->overlap_start  = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  pprm->pix            = gal_data_malloc_array(GAL_TYPE_SIZE_T, 2*ndim,
+                                               __func__, "pprm->pix");
+  pprm->host_start     = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                               __func__, "pprm->host_start");
+  pprm->kernel_start   = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                               __func__,
+                                               "pprm->kernel_start");
+  pprm->overlap_start  = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                               __func__,
+                                               "pprm->overlap_start");
   pprm->overlap        = gal_data_alloc(NULL, block->type, ndim, dsize,
                                         NULL, 0, -1, NULL, NULL, NULL);
   free(dsize);
diff --git a/lib/data.c b/lib/data.c
index eb4f118..3115a1a 100644
--- a/lib/data.c
+++ b/lib/data.c
@@ -127,15 +127,23 @@ gal_data_ptr_dist(void *earlier, void *later, uint8_t 
type)
    bytes each element needs will be determined internaly by this function
    using the datatype argument, so you don't have to worry about it. */
 void *
-gal_data_malloc_array(uint8_t type, size_t size)
+gal_data_malloc_array(uint8_t type, size_t size, const char *funcname,
+                      const char *varname)
 {
   void *array;
 
   errno=0;
   array=malloc( size * gal_type_sizeof(type) );
   if(array==NULL)
-    error(EXIT_FAILURE, errno, "%s: array of %zu bytes", __func__,
-          size * gal_type_sizeof(type));
+    {
+      if(varname)
+        error(EXIT_FAILURE, errno, "%s: %zu bytes couldn't be allocated "
+              "for variable `%s'", funcname ? funcname : __func__,
+              size * gal_type_sizeof(type), varname);
+      else
+        error(EXIT_FAILURE, errno, "%s: %zu bytes couldn't be allocated",
+              funcname ? funcname : __func__, size * gal_type_sizeof(type));
+    }
 
   return array;
 }
@@ -145,15 +153,23 @@ gal_data_malloc_array(uint8_t type, size_t size)
 
 
 void *
-gal_data_calloc_array(uint8_t type, size_t size)
+gal_data_calloc_array(uint8_t type, size_t size, const char *funcname,
+                      const char *varname)
 {
   void *array;
 
   errno=0;
-  array=calloc( size,  gal_type_sizeof(type) );
+  array=calloc( size, gal_type_sizeof(type) );
   if(array==NULL)
-    error(EXIT_FAILURE, errno, "%s: array of %zu bytes", __func__,
-          size * gal_type_sizeof(type));
+    {
+      if(varname)
+        error(EXIT_FAILURE, errno, "%s: %zu bytes couldn't be allocated "
+              "for variable `%s'", funcname ? funcname : __func__,
+              size * gal_type_sizeof(type), varname);
+      else
+        error(EXIT_FAILURE, errno, "%s: %zu bytes couldn't be allocated",
+              funcname ? funcname : __func__, size * gal_type_sizeof(type));
+    }
 
   return array;
 }
@@ -311,9 +327,11 @@ gal_data_initialize(gal_data_t *data, void *array, uint8_t 
type,
                 /* Allocate the space in RAM. */
                 data->array = ( clear
                                 ? gal_data_calloc_array(data->type,
-                                                        data->size)
+                                                        data->size, __func__,
+                                                        "data->array")
                                 : gal_data_malloc_array(data->type,
-                                                        data->size) );
+                                                        data->size, __func__,
+                                                        "data->array") );
             }
           else data->array=NULL; /* The given size was zero! */
         }
diff --git a/lib/dimension.c b/lib/dimension.c
index 293df4a..2600ee3 100644
--- a/lib/dimension.c
+++ b/lib/dimension.c
@@ -55,7 +55,7 @@ size_t *
 gal_dimension_increment(size_t ndim, size_t *dsize)
 {
   int i;
-  size_t *out=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *out=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "out");
 
   /* Along the fastest dimension, it is 1. */
   out[ndim-1]=1;
diff --git a/lib/fits.c b/lib/fits.c
index 3ed2418..765f0b8 100644
--- a/lib/fits.c
+++ b/lib/fits.c
@@ -761,7 +761,8 @@ gal_fits_key_read_from_ptr(fitsfile *fptr, gal_data_t 
*keysll,
            set the size and ndim to 1. But first allocate dsize if it
            wasn't already allocated. */
         if(tmp->dsize==NULL)
-          tmp->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 1);
+          tmp->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 1, __func__,
+                                           "tmp->dsize");
         tmp->ndim=tmp->size=tmp->dsize[0]=1;
 
         /* When the type is a string, `tmp->array' is an array of pointers
@@ -774,7 +775,9 @@ gal_fits_key_read_from_ptr(fitsfile *fptr, gal_data_t 
*keysll,
             errno=0;
             tmp->array=strarray=( tmp->array
                                   ? tmp->array
-                                  : gal_data_malloc_array(tmp->type, 1) );
+                                  : gal_data_malloc_array(tmp->type, 1,
+                                                          __func__,
+                                                          "tmp->array") );
             valueptr=strarray[0]=malloc(FLEN_VALUE * sizeof *strarray[0]);
             if(strarray[0]==NULL)
               error(EXIT_FAILURE, errno, "%s: %zu bytes for strarray[0]",
@@ -784,7 +787,9 @@ gal_fits_key_read_from_ptr(fitsfile *fptr, gal_data_t 
*keysll,
           default:
             tmp->array=valueptr=( tmp->array
                                   ? tmp->array
-                                  : gal_data_malloc_array(tmp->type, 1) );
+                                  : gal_data_malloc_array(tmp->type, 1,
+                                                          __func__,
+                                                          "tmp->array") );
           }
 
         /* Allocate space for the keyword comment if necessary.*/
@@ -1239,7 +1244,7 @@ gal_fits_img_info(fitsfile *fptr, int *type, size_t 
*ndim, size_t **dsize)
 
   /* Allocate the array to keep the dimension size and fill it in, note
      that its order is the opposite of naxes. */
-  *dsize=gal_data_malloc_array(GAL_TYPE_INT64, *ndim);
+  *dsize=gal_data_malloc_array(GAL_TYPE_INT64, *ndim, __func__, "dsize");
   for(i=0; i<*ndim; ++i)
     (*dsize)[i]=naxes[*ndim-1-i];
 }
@@ -1283,7 +1288,7 @@ gal_fits_img_read(char *filename, char *hdu, size_t 
minmapsize)
 
 
   /* Set the fpixel array (first pixel in all dimensions): */
-  fpixel=gal_data_malloc_array(GAL_TYPE_INT64, ndim);
+  fpixel=gal_data_malloc_array(GAL_TYPE_INT64, ndim, __func__, "fpixel");
   for(i=0;i<ndim;++i) fpixel[i]=1;
 
 
@@ -1432,7 +1437,7 @@ gal_fits_img_write_to_ptr(gal_data_t *input, char 
*filename)
   /* Allocate the naxis area. */
   naxes=gal_data_malloc_array( ( sizeof(long)==8
                                  ? GAL_TYPE_INT64
-                                 : GAL_TYPE_INT32 ), ndim);
+                                 : GAL_TYPE_INT32 ), ndim, __func__, "naxes");
 
   /* Open the file for writing */
   fptr=gal_fits_open_to_write(filename);
diff --git a/lib/gnuastro/data.h b/lib/gnuastro/data.h
index 65ae92d..5d30f1d 100644
--- a/lib/gnuastro/data.h
+++ b/lib/gnuastro/data.h
@@ -242,10 +242,12 @@ size_t
 gal_data_ptr_dist(void *earlier, void *later, uint8_t type);
 
 void *
-gal_data_malloc_array(uint8_t type, size_t size);
+gal_data_malloc_array(uint8_t type, size_t size, const char *funcname,
+                      const char *varname);
 
 void *
-gal_data_calloc_array(uint8_t type, size_t size);
+gal_data_calloc_array(uint8_t type, size_t size, const char *funcname,
+                      const char *varname);
 
 void
 gal_data_initialize(gal_data_t *data, void *array, uint8_t type, size_t ndim,
diff --git a/lib/interpolate.c b/lib/interpolate.c
index a3a98d4..087e84c 100644
--- a/lib/interpolate.c
+++ b/lib/interpolate.c
@@ -92,8 +92,10 @@ interpolate_close_neighbors_on_thread(void *in_prm)
   size_t ngb_counter, dist, pind, *dinc;
   size_t i, index, fullind, chstart=0, ndim=input->ndim;
   gal_data_t *median, *tin, *tout, *tnear, *nearest=NULL;
-  size_t *icoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  size_t *ncoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *icoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "icoord");
+  size_t *ncoord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "ncoord");
   size_t size = (correct_index ? tl->tottilesinch : input->size);
   size_t *dsize = (correct_index ? tl->numtilesinch : input->dsize);
   uint8_t *fullflag=&prm->thread_flags[tprm->id*input->size], *flag=fullflag;
@@ -375,7 +377,8 @@ gal_interpolate_close_neighbors(gal_data_t *input,
                          input->wcs, 0, input->minmapsize, NULL,
                          input->unit, NULL);
   gal_list_void_add(&prm.ngb_vals,
-                    gal_data_malloc_array(input->type, ngbvnum));
+                    gal_data_malloc_array(input->type, ngbvnum, __func__,
+                                          "prm.ngb_vals"));
 
 
   /* If we are given a list of datasets, make the necessary
@@ -398,7 +401,8 @@ gal_interpolate_close_neighbors(gal_data_t *input,
 
         /* Allocate the space for the neighbor values of this input. */
         gal_list_void_add(&prm.ngb_vals,
-                          gal_data_malloc_array(tin->type, ngbvnum));
+                          gal_data_malloc_array(tin->type, ngbvnum, __func__,
+                                                "prm.ngb_vals"));
       }
   gal_list_data_reverse(&prm.out);
   gal_list_void_reverse(&prm.ngb_vals);
@@ -407,7 +411,8 @@ gal_interpolate_close_neighbors(gal_data_t *input,
   /* Allocate space for all the flag values of all the threads here (memory
      in each thread is limited) and this is cleaner. */
   prm.thread_flags=gal_data_malloc_array(GAL_TYPE_UINT8,
-                                         numthreads*input->size);
+                                         numthreads*input->size, __func__,
+                                         "prm.thread_flags");
 
 
   /* Spin off the threads. */
diff --git a/lib/list.c b/lib/list.c
index 2ed56c8..3a1d85b 100644
--- a/lib/list.c
+++ b/lib/list.c
@@ -268,7 +268,7 @@ gal_list_i32_to_array(gal_list_i32_t *list, int reverse, 
size_t *num)
 
   if(*num)
     {
-      out=gal_data_malloc_array(GAL_TYPE_SIZE_T, *num);
+      out=gal_data_malloc_array(GAL_TYPE_SIZE_T, *num, __func__, "out");
 
       i = reverse ? *num-1: 0;
       if(reverse)
@@ -417,7 +417,7 @@ gal_list_sizet_to_array(gal_list_sizet_t *list, int 
reverse, size_t *num)
 
   if(*num)
     {
-      out=gal_data_malloc_array(GAL_TYPE_SIZE_T, *num);
+      out=gal_data_malloc_array(GAL_TYPE_SIZE_T, *num, __func__, "out");
 
       i = reverse ? *num-1: 0;
       if(reverse)
@@ -572,7 +572,7 @@ gal_list_f32_to_array(gal_list_f32_t *list, int reverse, 
size_t *num)
   if(*num)
     {
       /* Allocate the space: */
-      out=gal_data_malloc_array(GAL_TYPE_FLOAT32, *num);
+      out=gal_data_malloc_array(GAL_TYPE_FLOAT32, *num, __func__, "out");
 
       /* Fill in the array. */
       i = reverse ? *num-1: 0;
@@ -729,7 +729,7 @@ gal_list_f64_to_array(gal_list_f64_t *list, int reverse, 
size_t *num)
   if(*num)
     {
       /* Allocate the space: */
-      out=gal_data_malloc_array(GAL_TYPE_FLOAT64, *num);
+      out=gal_data_malloc_array(GAL_TYPE_FLOAT64, *num, __func__, "out");
 
       /* Fill in the array. */
       i = reverse ? *num-1: 0;
diff --git a/lib/options.c b/lib/options.c
index 2abfc83..62d300e 100644
--- a/lib/options.c
+++ b/lib/options.c
@@ -579,7 +579,7 @@ gal_options_parse_sizes_reverse(struct argp_option *option, 
char *arg,
       /* Write the values into an allocated size_t array and finish it with
          a `-1' so the total number can be found later.*/
       num=values->size;
-      array=gal_data_malloc_array(GAL_TYPE_SIZE_T, num+1);
+      array=gal_data_malloc_array(GAL_TYPE_SIZE_T, num+1, __func__, "array");
       for(i=0;i<num;++i) array[num-1-i]=v[i];
       array[num] = (size_t)(-1);
 
diff --git a/lib/permutation.c b/lib/permutation.c
index 892f1b2..d5f86ef 100644
--- a/lib/permutation.c
+++ b/lib/permutation.c
@@ -100,7 +100,7 @@ gal_permutation_apply(gal_data_t *input, size_t 
*permutation)
     {
       /* Necessary initializations. */
       width=gal_type_sizeof(input->type);
-      tmp=gal_data_malloc_array(input->type, 1);
+      tmp=gal_data_malloc_array(input->type, 1, __func__, "tmp");
 
       /* Do the permutation. */
       for(i=0;i<input->size;++i)
@@ -149,8 +149,8 @@ gal_permutation_apply_inverse(gal_data_t *input, size_t 
*permutation)
     {
       /* Initializations */
       width=gal_type_sizeof(input->type);
-      tmp=gal_data_malloc_array(input->type, 1);
-      ttmp=gal_data_malloc_array(input->type, 1);
+      tmp=gal_data_malloc_array(input->type, 1, __func__, "tmp");
+      ttmp=gal_data_malloc_array(input->type, 1, __func__, "ttmp");
 
       /* Re-order the values. */
       for(i=0;i<input->size;++i)
diff --git a/lib/tableintern.c b/lib/tableintern.c
index 15d4c38..a090abd 100644
--- a/lib/tableintern.c
+++ b/lib/tableintern.c
@@ -424,7 +424,8 @@ gal_tableintern_read_blank(gal_data_t *col, char *blank)
      correctly. */
   if( !gal_type_from_string((void **)(&col->array), blank, col->type) )
     {
-      col->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 1);
+      col->dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, 1, __func__,
+                                       "col->dsize");
       col->dsize[0]=col->ndim=col->size=1;
     }
 }
diff --git a/lib/tile.c b/lib/tile.c
index 24b4029..d1c934a 100644
--- a/lib/tile.c
+++ b/lib/tile.c
@@ -136,8 +136,10 @@ gal_tile_start_end_ind_inclusive(gal_data_t *tile, 
gal_data_t *work,
 {
   gal_data_t *block=gal_tile_block(tile);
   size_t ndim=tile->ndim, *s, *e, *l, *sf;
-  size_t *start_coord = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  size_t *end_coord   = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *start_coord = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                              __func__, "start_coord");
+  size_t *end_coord   = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                              __func__, "end_coord");
 
 
   /* The starting index can be found from the distance of the `tile->array'
@@ -246,7 +248,8 @@ gal_tile_series_from_minmax(gal_data_t *block, size_t 
*minmax, size_t number)
       /* Set the size related constants. */
       size = 1;
       tiles[i].ndim  = ndim;
-      tiles[i].dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+      tiles[i].dsize = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                             "tiles[i].dsize");
       for(d=0;d<ndim;++d) size *= tiles[i].dsize[d] = max[d] - min[d] + 1;
       tiles[i].size  = size;
 
@@ -730,11 +733,16 @@ gal_tile_full(gal_data_t *input, size_t *regular,
 {
   size_t i, d, tind, numtiles, *start=NULL;
   gal_data_t *tiles, *block=gal_tile_block(input);
-  size_t *last   = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
-  size_t *first  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
-  size_t *coord  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
-  size_t *tcoord = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
-  size_t *tsize  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim+1);
+  size_t *last   = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim,
+                                         __func__, "last");
+  size_t *first  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim,
+                                         __func__, "first");
+  size_t *coord  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim,
+                                         __func__, "coord");
+  size_t *tcoord = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim,
+                                         __func__, "tcoord");
+  size_t *tsize  = gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim+1,
+                                         __func__, "tsize");
 
 
   /* Set the first tile size and total number of tiles along each
@@ -753,7 +761,8 @@ gal_tile_full(gal_data_t *input, size_t *regular,
      the block's dimensions when calculating the position of this block. */
   if(input->block)
     {
-      start=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim);
+      start=gal_data_malloc_array(GAL_TYPE_SIZE_T, input->ndim, __func__,
+                                  "start");
       gal_tile_start_coord(input, start);
     }
 
@@ -797,7 +806,8 @@ gal_tile_full(gal_data_t *input, size_t *regular,
       tiles[i].size=1; /* Just an initializer, will be changed. */
       tiles[i].ndim=input->ndim;
       tiles[i].minmapsize=input->minmapsize;
-      tiles[i].dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T,input->ndim);
+      tiles[i].dsize=gal_data_malloc_array(GAL_TYPE_SIZE_T,input->ndim,
+                                           __func__, "tiles[i].dsize");
       for(d=0;d<input->ndim;++d)
         {
           /* The size of the first and last tiles can be different from the
@@ -893,7 +903,8 @@ gal_tile_full_sanity_check(char *filename, char *hdu, 
gal_data_t *input,
 
 
   /* Allocate space for the channel sizes. */
-  tl->channelsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  tl->channelsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim,
+                                        __func__, "tl->channelsize");
 
 
   /* Check if the channels are exactly divisible by the input's size along
@@ -991,7 +1002,8 @@ gal_tile_full_two_layers(gal_data_t *input,
   /* Multiply the number of tiles along each dimension OF ONE CHANNEL by
      the number of channels in each dimension to get the dimensionality of
      the full tile structure. */
-  tl->numtiles = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  tl->numtiles = gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                       "tl->numtiles");
   for(i=0;i<ndim;++i)
     tl->numtiles[i] = tl->numtilesinch[i] * tl->numchannels[i];
   tl->tottiles = gal_dimension_total_size(ndim, tl->numtiles);
@@ -1026,9 +1038,11 @@ gal_tile_full_permutation(struct 
gal_tile_two_layer_params *tl)
   if( ndim==1 || tl->totchannels==1) return;
 
   /* Allocate the space for the permutation and coordinates. */
-  ch_coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  tinch_coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
-  tl->permutation=gal_data_malloc_array(GAL_TYPE_SIZE_T, tl->tottiles);
+  ch_coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__, "ch_coord");
+  tinch_coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                    "tinch_coord");
+  tl->permutation=gal_data_malloc_array(GAL_TYPE_SIZE_T, tl->tottiles,
+                                        __func__, "tl->permutation");
 
   /* Fill in the permutation, we use the fact that the tiles are filled
      from the first channel to the last. */
@@ -1128,7 +1142,7 @@ gal_tile_full_values_smooth(gal_data_t *tilevalues,
 
 
   /* Prepare the kernel size along every dimension. */
-  kdsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, tl->ndim);
+  kdsize=gal_data_malloc_array(GAL_TYPE_SIZE_T, tl->ndim, __func__, "kdsize");
   for(i=0;i<tl->ndim;++i) kdsize[i]=width;
 
 
diff --git a/lib/type.c b/lib/type.c
index 3dca101..197fffd 100644
--- a/lib/type.c
+++ b/lib/type.c
@@ -340,7 +340,7 @@ gal_type_bit_string(void *in, size_t size)
 {
   size_t i;
   char *byte=in;
-  char *str=gal_data_malloc_array(GAL_TYPE_UINT8, 8*size+1);
+  char *str=gal_data_malloc_array(GAL_TYPE_UINT8, 8*size+1, __func__, "str");
 
   /* Print the bits into the allocated string. This was inspired from
 
@@ -437,7 +437,7 @@ gal_type_from_string(void **out, char *string, uint8_t type)
   if( *out==NULL && !gal_type_is_list(type) )
     {
       allocated=1;
-      *out=gal_data_malloc_array(type, 1);
+      *out=gal_data_malloc_array(type, 1, __func__, "out");
     }
   value=*out;
 
@@ -597,7 +597,7 @@ gal_type_string_to_number(char *string, uint8_t *type)
     }
 
   /* Allocate a one-element dataset, then copy the number into it. */
-  out=gal_data_malloc_array(*type, 1);
+  out=gal_data_malloc_array(*type, 1, __func__, "out");
   memcpy(out, ptr, gal_type_sizeof(*type));
   return out;
 }
diff --git a/lib/wcs.c b/lib/wcs.c
index c0d9b08..eb566e9 100644
--- a/lib/wcs.c
+++ b/lib/wcs.c
@@ -240,7 +240,8 @@ gal_wcs_on_tile(gal_data_t *tile)
 {
   size_t i, start_ind, ndim=tile->ndim;
   gal_data_t *block=gal_tile_block(tile);
-  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim);
+  size_t *coord=gal_data_malloc_array(GAL_TYPE_SIZE_T, ndim, __func__,
+                                      "coord");
 
   /* If the tile already has a WCS structure, don't do anything. */
   if(tile->wcs) return;
@@ -511,12 +512,15 @@ gal_wcs_world_to_img(struct wcsprm *wcs, double *ra, 
double *dec,
   double *phi, *theta, *world, *pixcrd, *imgcrd;
 
   /* Allocate all the necessary arrays. */
-  phi    = gal_data_malloc_array( GAL_TYPE_FLOAT64, size   );
-  stat   = gal_data_calloc_array( GAL_TYPE_INT32,   size   );
-  theta  = gal_data_malloc_array( GAL_TYPE_FLOAT64, size   );
-  world  = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
-  imgcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
-  pixcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
+  phi    = gal_data_malloc_array( GAL_TYPE_FLOAT64, size, __func__, "phi");
+  stat   = gal_data_calloc_array( GAL_TYPE_INT32,   size, __func__, "stat");
+  theta  = gal_data_malloc_array( GAL_TYPE_FLOAT64, size, __func__, "theta");
+  world  = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "world");
+  imgcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "imgcrd");
+  pixcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "pixcrd");
 
   /* Write the values into the allocated contiguous array. */
   for(i=0;i<size;++i) { world[i*2]=ra[i]; world[i*2+1]=dec[i]; }
@@ -535,8 +539,8 @@ gal_wcs_world_to_img(struct wcsprm *wcs, double *ra, double 
*dec,
   */
 
   /* Allocate the output arrays if they were not already allocated. */
-  if(*x==NULL) *x=gal_data_malloc_array(GAL_TYPE_FLOAT64, size);
-  if(*y==NULL) *y=gal_data_malloc_array(GAL_TYPE_FLOAT64, size);
+  if(*x==NULL) *x=gal_data_malloc_array(GAL_TYPE_FLOAT64, size, __func__,"x");
+  if(*y==NULL) *y=gal_data_malloc_array(GAL_TYPE_FLOAT64, size, __func__,"y");
 
   /* Put the values into the output arrays. */
   for(i=0;i<size;++i)
@@ -568,12 +572,15 @@ gal_wcs_img_to_world(struct wcsprm *wcs, double *x, 
double *y,
   double *phi, *theta, *world, *pixcrd, *imgcrd;
 
   /* Allocate all the necessary arrays. */
-  phi    = gal_data_malloc_array( GAL_TYPE_FLOAT64, size   );
-  stat   = gal_data_calloc_array( GAL_TYPE_INT32,   size   );
-  theta  = gal_data_malloc_array( GAL_TYPE_FLOAT64, size   );
-  world  = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
-  imgcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
-  pixcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size );
+  phi    = gal_data_malloc_array( GAL_TYPE_FLOAT64, size, __func__, "phi");
+  stat   = gal_data_calloc_array( GAL_TYPE_INT32,   size, __func__, "stat");
+  theta  = gal_data_malloc_array( GAL_TYPE_FLOAT64, size, __func__, "theta");
+  world  = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "world");
+  imgcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "imgcrd");
+  pixcrd = gal_data_malloc_array( GAL_TYPE_FLOAT64, 2*size, __func__,
+                                  "pixcrd");
 
   /* Write the values into the allocated contiguous array. */
   for(i=0;i<size;++i) { pixcrd[i*2]=x[i]; pixcrd[i*2+1]=y[i]; }
@@ -592,8 +599,10 @@ gal_wcs_img_to_world(struct wcsprm *wcs, double *x, double 
*y,
   */
 
   /* Allocate the output arrays if they were not already allocated. */
-  if(*ra==NULL)  *ra  = gal_data_malloc_array(GAL_TYPE_FLOAT64, size);
-  if(*dec==NULL) *dec = gal_data_malloc_array(GAL_TYPE_FLOAT64, size);
+  if(*ra==NULL)
+    *ra  = gal_data_malloc_array(GAL_TYPE_FLOAT64, size, __func__, "ra");
+  if(*dec==NULL)
+    *dec = gal_data_malloc_array(GAL_TYPE_FLOAT64, size, __func__, "dec");
 
   /* Put the values into the output arrays. */
   for(i=0;i<size;++i)



reply via email to

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