Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Retrieves free-space section information for a file

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5F_GET_FREE_SECTIONS(fcpl_id, type, nsects, sect_info)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">ssize_t H5Fget_free_sections( hid_t fcpl_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t * sect_info )</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t fcpl_idIN: The file creation property list identifier

.

H5F_mem_t typeIN: The file memory allocation type

.

Valid values are as follows:

H5FD_MEM_DEFAULT  The default file memory allocation type

.

H5FD_MEM_SUPERFile memory allocated for Superblock

.

H5FD_MEM_BTREEFile memory allocated for B-tree

.

H5FD_MEM_DRAWFile memory allocated for raw data

.

H5FD_MEM_GHEAPFile memory allocated for Global Heap

.

H5FD_MEM_LHEAPFile memory allocated for Local Heap

.

H5FD_MEM_OHDRFile memory allocated for Object Header

.

 

There are other file memory allocation types that are mapped to the above six basic types.

hsize_t nsectsIN: The number of free-space sections.
H5F_sect_info_t *sect_infoIN/OUT: Pointer to instances of H5F_sect_info_t in which the free-space section information is to be returned

.

An H5F_sect_info_t struct is defined as follows (in H5Fpublic.h):

        typedef struct H5F_sect_info_t {
            haddr_t     addr;     /* address of the     */
                                  /* free-space section */
            hsize_t     size;     /* size of the        */
                                  /* free-space section */
        } H5F_sect_info_t;

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Fget

H5F_

free_sections retrieves

GET_FREE_SECTIONS retrieves free-space section information for the free-space manager with type that is associated with file fcpl_id. If type is H5FD_MEM_DEFAULT, this routine retrieves free-space section information for all the free-space managers in the file.

This routine retrieves free-space section information for nsects sections or at most the maximum number of sections in the specified free-space manager. If the number of sections is not known, a

preliminary H5Fget

preliminary H5F_

free_sections() call

GET_FREE_SECTIONS call can be made by setting sect_info to NULL and the total number of free-space sections for the specified free-space manager will be returned. Users can then allocate space for entries in sect_info, each of which is defined as an H5F_sect_info_t struct (see Parameters section).

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns the number of free-space sections for the specified free-space manager in the file; otherwise returns a negative value. 

Warning

Failure Modes:

This routine will fail when the following is true:

  • The library fails to retrieve the file creation property list associated with fcpl_id.
  • If the parameter sect_info is

nonnull

  • non-null, but the parameter nsects is equal to 0.
  • The library fails to retrieve free-space section information for the file associated with the file creation property list fcpl_id.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section
Info

Example Usage:

The first example shows that the first call to H5Fget_free_sections() returns the total number of free-space sections in nsects for all the free-space managers in the file that is associated with fcpl. The second call to H5Fget_free_sections() retrieves free-space section information in sect_info for nsects sections. The value in ret is the same as nsects.

nsects = H5Fget_free_sections(fcpl, H5FD_MEM_DEFAULT, 0, NULL);
:
: Allocate space for entries in sect_info
:
ret = H5F_get_free_sections(fcpl, H5FD_MEM_DEFAULT, nsects, sect_info);

 

The second example shows that the first call to H5Fget_free_sections() returns the total number of free-space sections in nsects for the H5FD_MEM_SUPER free-space manager in the file that is associated with fcpl. Even though there are nsects sections for the specified free-space manager, the second call to H5Fget_free_sections() retrieves free-space section information in sect_info for nsects-1 sections as requested. The value in ret is the same as nsects.

nsects = H5Fget_free_sections(fcpl, H5FD_MEM_SUPER, 0, NULL);
:
: Allocate space for entries in sect_info
:
ret = H5F_get_free_sections(fcpl, H5FD_MEM_SUPER, nsects-1, sect_info);

 

The third example shows that the first call to H5Fget_free_sections() returns the total number of free-space sections in nsects for the H5FD_MEM_BTREE free-space manager in the file that is associated with fcpl. Even though the second call to H5Fget_free_sections() requests nsects+1sections, the routine retrieves free-space section information in sect_info for only nsects sections. The value in ret is the same as nsects.

nsects = H5Fget_free_sections(fcpl, H5FD_MEM_BTREE, 0, NULL);
:
: Allocate space for entries in sect_info
:
ret = H5F_get_free_sections(fcpl, H5FD_MEM_BTREE, nsects+1, sect_info);
Comment
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.10.0C function introduced in this release.