summaryrefslogtreecommitdiffstats
path: root/src/H5MFsection.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-06 23:33:00 (GMT)
committerGitHub <noreply@github.com>2022-03-06 23:33:00 (GMT)
commit78375882485a99a81caa933928ed08d7a38ef88b (patch)
treef18c41d7794d546b6562dd2aa36932c78f00a16a /src/H5MFsection.c
parent7e176db164d1a6f944e703c612c4952b15d333f4 (diff)
downloadhdf5-78375882485a99a81caa933928ed08d7a38ef88b.zip
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.gz
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.bz2
VFD SWMR: normalization with develop (#1472)
Much normalization with develop. Still needs tools changes wrt VFD plugins.
Diffstat (limited to 'src/H5MFsection.c')
-rw-r--r--src/H5MFsection.c44
1 files changed, 19 insertions, 25 deletions
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index e686842d..2f5103f 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -472,8 +472,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", __func__, sect->sect_info.addr,
- sect->sect_info.size, eoa);
+ HDfprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -496,8 +497,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->meta_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins metadata aggregator\n", __func__,
- sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -517,8 +519,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->sdata_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", __func__,
- sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -625,8 +628,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", __func__, (*sect)->sect_info.addr,
- (*sect)->sect_info.size);
+ HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Do not adjust the section raw data or global heap data */
@@ -653,8 +656,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
else if (prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", __func__, (*sect)->sect_info.addr,
- (*sect)->sect_info.size);
+ HDfprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -702,7 +705,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
ret_value = FALSE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", __func__, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -798,30 +801,20 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments. */
HDassert(sect1);
HDassert(sect2);
HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- if (!H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)) {
- HDfprintf(stderr,
- "%s.%d: sect1->sect_info.addr %" PRIuHADDR ", sect2->sect_info.addr %" PRIuHADDR "\n",
- __func__, __LINE__, sect1->sect_info.addr, sect2->sect_info.addr);
- HDfprintf(stderr,
- "%s.%d: sect1->sect_info.size %" PRIuHSIZE ", sect2->sect_info.size %" PRIuHSIZE "\n",
- __func__, __LINE__, sect1->sect_info.size, sect2->sect_info.size);
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't merge")
- }
HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", __func__, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF__sect_large_can_merge() */
@@ -907,8 +900,9 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", __func__, sect->sect_info.addr,
- sect->sect_info.size, eoa);
+ HDfprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */