diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2013-10-31 04:20:36 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2013-10-31 04:20:36 (GMT) |
commit | e6cace9ee46e903a8612aba7d9d1d72fa0968217 (patch) | |
tree | ac7d07ea06d3d5ac73e34bc54ff17620a4d083fe /tools/misc | |
parent | 2eb24b16dac78b3e27769c20502299475fb8dde6 (diff) | |
download | hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.zip hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.gz hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.bz2 |
[svn-r24376] Updated all code to use HDmalloc, HDcalloc, and HDfree.
Prep work for adding a memory free function, part of HDFFV-8551.
Tested on:
32-bit LE linux (jam)
* with C++, Fortran
* with thread safety on
These are minor changes (almost entirely renaming foo functions
to HDfoo) that don't change functionality. This should not
require a full commit test.
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/h5repart.c | 4 | ||||
-rw-r--r-- | tools/misc/talign.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 07f6bfd..ffd52e8 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -290,7 +290,7 @@ main (int argc, char *argv[]) if (argno<argc) usage (prog_name); /* Now the real work, split the file */ - buf = malloc (blk_size); + buf = HDmalloc (blk_size); while (src_offset<src_size) { /* Read a block. The amount to read is the minimum of: @@ -498,6 +498,6 @@ main (int argc, char *argv[]) } /* Free resources and return */ - free (buf); + HDfree (buf); return EXIT_SUCCESS; } diff --git a/tools/misc/talign.c b/tools/misc/talign.c index 017eb55..66318bf 100644 --- a/tools/misc/talign.c +++ b/tools/misc/talign.c @@ -126,7 +126,7 @@ int main(void) H5Dclose(set); /* Now open the set, and read it back in */ - data = (char *)malloc(H5Tget_size(fix)); + data = (char *)HDmalloc(H5Tget_size(fix)); if(!data) { perror("malloc() failed"); @@ -152,7 +152,7 @@ out: mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0), string5, (char *)(data + H5Tget_member_offset(fix, 0))); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); mname = H5Tget_member_name(fix, 1); @@ -163,7 +163,7 @@ out: (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 2)); mname = H5Tget_member_name(fix, 2); @@ -173,7 +173,7 @@ out: (double)fnok[0], (double)fptr[0], (double)fnok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); printf("\n" @@ -192,7 +192,7 @@ out: } if(data) - free(data); + HDfree(data); H5Sclose(spc); H5Tclose(cmp); H5Tclose(cmp1); |