summaryrefslogtreecommitdiffstats
path: root/src/H5FDlog.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2012-06-06 21:12:34 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2012-06-06 21:12:34 (GMT)
commit596d5b2662e0cd9003efdfce6dd0fa160395ba67 (patch)
tree89e20ff22e826fa7b2a486c72b7a85c61deb7f69 /src/H5FDlog.c
parent71ca559f81df96e2e792e4bb831f4f07db860cf9 (diff)
downloadhdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.zip
hdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.tar.gz
hdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.tar.bz2
[svn-r22438] (1) fix for making MEM_GHEAP as MEM_DRAW
(2) fix to extend into the aggregator based on threshold (3) fix for the "flavor" logging problem (4) fix for test failures due to the above fixes (5) bug fix for h5stat when h5stat against a non-existing file --Ths line, and th se below, will be ignored-- M test/mf.c M src/H5MFaggr.c M src/H5FDpublic.h M src/H5MF.c M src/H5FDmulti.c M src/H5FDlog.c M src/H5Faccum.c M tools/h5copy/testfiles/h5copytst.out.ls M tools/h5copy/testfiles/h5copy_ref.out.ls M tools/h5stat/testh5stat.sh.in M tools/h5stat/h5stat.c
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r--src/H5FDlog.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index e3d67359..bd53658 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -1020,12 +1020,29 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
+H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ if(file->fa.flags != 0) {
+ if(H5F_addr_gt(addr, file->eoa) && H5F_addr_gt(addr, 0)) {
+ hsize_t size = addr - file->eoa;
+
+ /* Retain the flavor of the space allocated by the extension */
+ if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ HDassert(addr < file->iosize);
+ H5_CHECK_OVERFLOW(size, hsize_t, size_t);
+ HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
+ } /* end if */
+
+ /* Log the extension like an allocation */
+ if(file->fa.flags & H5FD_LOG_ALLOC)
+ HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
+ } /* end if */
+ } /* end if */
+
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)