summaryrefslogtreecommitdiffstats
path: root/src/H5Zdeflate.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-18 14:39:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-18 14:39:26 (GMT)
commit64b7be4a52b14dfefc7729aaf8be6649fb668cc4 (patch)
tree5e1061bf9dc61a5753a90dea5801672c03c8fdf4 /src/H5Zdeflate.c
parent972707dcd3a123df1435d35d6b6a585222a1b6df (diff)
downloadhdf5-64b7be4a52b14dfefc7729aaf8be6649fb668cc4.zip
hdf5-64b7be4a52b14dfefc7729aaf8be6649fb668cc4.tar.gz
hdf5-64b7be4a52b14dfefc7729aaf8be6649fb668cc4.tar.bz2
[svn-r5662] Purpose:
Bug fix. Description: The chunking code was using internal allocation routines to put blocks on a free list for reuse, instead of using the system allocation routines (ie. malloc, free, etc.). This causes problems when user filters attempt to allocate/free chunks for their algorithm's use. Solution: Switched the chunking code back to using the system allocation routines, we can address performance issues with them if it becomes a real problem. Platforms tested: Linux 2.2.x (eirene) && IRIX64 6.5 (modi4)
Diffstat (limited to 'src/H5Zdeflate.c')
-rw-r--r--src/H5Zdeflate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 57cabb3..3f43310 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -72,7 +72,7 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
z_stream z_strm;
size_t nalloc = *buf_size;
- if (NULL==(outbuf = H5F_istore_chunk_alloc(nalloc))) {
+ if (NULL==(outbuf = H5MM_malloc(nalloc))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed for deflate uncompression");
}
@@ -93,7 +93,7 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
}
if (Z_OK==status && 0==z_strm.avail_out) {
nalloc *= 2;
- if (NULL==(outbuf = H5F_istore_chunk_realloc(outbuf, nalloc))) {
+ if (NULL==(outbuf = H5MM_realloc(outbuf, nalloc))) {
inflateEnd(&z_strm);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed for deflate "
@@ -104,7 +104,7 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
}
}
- H5F_istore_chunk_free(*buf);
+ H5MM_xfree(*buf);
*buf = outbuf;
outbuf = NULL;
*buf_size = nalloc;
@@ -122,7 +122,7 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
uLongf z_dst_nbytes = (uLongf)nbytes;
uLong z_src_nbytes = (uLong)nbytes;
- if (NULL==(z_dst=outbuf=H5F_istore_chunk_alloc(nbytes))) {
+ if (NULL==(z_dst=outbuf=H5MM_malloc(nbytes))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0,
"unable to allocate deflate destination buffer");
}
@@ -135,7 +135,7 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
} else if (Z_OK!=status) {
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, 0, "deflate error");
} else {
- H5F_istore_chunk_free(*buf);
+ H5MM_xfree(*buf);
*buf = outbuf;
outbuf = NULL;
*buf_size = nbytes;
@@ -149,6 +149,6 @@ H5Z_filter_deflate (unsigned UNUSED flags, size_t cd_nelmts,
done:
if(outbuf)
- H5F_istore_chunk_free(outbuf);
+ H5MM_xfree(outbuf);
FUNC_LEAVE (ret_value);
}