summaryrefslogtreecommitdiffstats
path: root/src/H5Dcontig.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-07-23 17:57:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-07-23 17:57:06 (GMT)
commit0fe805bc647fad2427e80f5bb4906db90b036921 (patch)
treec4f9bcad98460f8e585fa5db0ea198e069fbff3c /src/H5Dcontig.c
parentccdd97ed9723ff6286a28ce5c79fcb2b493f8c6f (diff)
downloadhdf5-0fe805bc647fad2427e80f5bb4906db90b036921.zip
hdf5-0fe805bc647fad2427e80f5bb4906db90b036921.tar.gz
hdf5-0fe805bc647fad2427e80f5bb4906db90b036921.tar.bz2
[svn-r5828] Purpose:
Code cleanup Description: Make the sieve buffer managed by the free-list code. Platforms tested: FreeBSD 4.6 (sleipnir)
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r--src/H5Dcontig.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index a009de1..461a068 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -18,13 +18,16 @@
#include "H5Eprivate.h"
#include "H5Fpkg.h"
#include "H5FDprivate.h" /*file driver */
-#include "H5MMprivate.h"
+#include "H5FLprivate.h" /*Free Lists */
/* Interface initialization */
#define PABLO_MASK H5Fcontig_mask
static int interface_initialize_g = 0;
#define INTERFACE_INIT NULL
+/* Declare a PQ free list to manage the sieve buffer information */
+H5FL_BLK_DEFINE(sieve_buf);
+
/*-------------------------------------------------------------------------
* Function: H5F_contig_read
@@ -476,7 +479,7 @@ H5F_contig_readv(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
} /* end if */
else {
/* Allocate room for the data sieve buffer */
- if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) {
+ if (NULL==(f->shared->sieve_buf=H5FL_BLK_ALLOC(sieve_buf,f->shared->sieve_buf_size,0))) {
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
@@ -961,7 +964,7 @@ H5F_contig_writev(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
} /* end if */
else {
/* Allocate room for the data sieve buffer */
- if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) {
+ if (NULL==(f->shared->sieve_buf=H5FL_BLK_ALLOC(sieve_buf,f->shared->sieve_buf_size,0))) {
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}