diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2012-06-07 16:04:56 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2012-06-07 16:04:56 (GMT) |
commit | 73db2056a31348fa4c0b14898c5ba66ab214021f (patch) | |
tree | d3f4d6e50e790019647684df731be21bb9b99132 /src/H5FDlog.c | |
parent | a6d41f7a75a8f16e6e0efbcf5efc428299c85483 (diff) | |
download | hdf5-73db2056a31348fa4c0b14898c5ba66ab214021f.zip hdf5-73db2056a31348fa4c0b14898c5ba66ab214021f.tar.gz hdf5-73db2056a31348fa4c0b14898c5ba66ab214021f.tar.bz2 |
[svn-r22444] (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
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 0b5c677..b2c6398 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -1022,12 +1022,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) |