diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dcontig.c | 9 | ||||
-rw-r--r-- | src/H5F.c | 5 | ||||
-rw-r--r-- | src/H5Fcontig.c | 9 |
3 files changed, 16 insertions, 7 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"); } @@ -85,6 +85,9 @@ H5FL_DEFINE_STATIC(H5F_file_t); /* Declare the external free list for the H5G_t struct */ H5FL_EXTERN(H5G_t); +/* Declare the external PQ free list for the sieve buffer information */ +H5FL_BLK_EXTERN(sieve_buf); + /*------------------------------------------------------------------------- * Function: H5F_init @@ -1478,7 +1481,7 @@ H5F_dest(H5F_t *f) /* Free the data sieve buffer, if it's been allocated */ if(f->shared->sieve_buf) { assert(f->shared->sieve_dirty==0); /* The buffer had better be flushed... */ - f->shared->sieve_buf = H5MM_xfree (f->shared->sieve_buf); + f->shared->sieve_buf = H5FL_BLK_FREE (sieve_buf,f->shared->sieve_buf); } /* end if */ /* Destroy file creation properties */ diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c index a009de1..461a068 100644 --- a/src/H5Fcontig.c +++ b/src/H5Fcontig.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"); } |