Sets garbage collecting references flag
H5P_SET_GC_REFERENCES ( plist, gc_ref )
herr_t H5Pset_gc_references(hid_t plist,
Fortran90 Interface: h5pset_gc_references_f
SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr)
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER, INTENT(IN) :: gc_reference ! Flag for garbage collecting
! references for the file
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
END SUBROUTINE h5pset_gc_references_f
|IN: File access property list identifier|
|IN: Flag setting reference garbage collection to on (|
1) or off (
H5P_SET_GC_REFERENCES sets the flag for garbage collecting references for the file.
Dataset region references and other reference types use space in an HDF5 file's global heap. If garbage collection is on and the user passes in an uninitialized value in a reference structure, the heap might get corrupted. When garbage collection is off, however, and the user re-uses a reference, the previous heap block will be orphaned and not returned to the free heap space.
When garbage collection is on, the user must initialize the reference structures to 0 or risk heap corruption.
The default value for garbage collecting references is off.
Returns a non-negative value if successful; otherwise returns a negative value.
--- Last Modified: July 25, 2019 | 01:58 PM