Retrieves free-space section information for a file
Procedure:
H5F_GET_FREE_SECTIONS (file_id, type, nsects, sect_info)
Signature:
ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info/*out*/)
Parameters:
hid_t file_id | IN: The file identifier |
H5F_mem_t type | IN: The file memory allocation type Valid values are as follows: H5FD_MEM_DEFAULT | The default file memory allocation type | H5FD_MEM_SUPER | File memory allocated for Superblock | H5FD_MEM_BTREE | File memory allocated for B-tree | H5FD_MEM_DRAW | File memory allocated for raw data | H5FD_MEM_GHEAP | File memory allocated for Global Heap | H5FD_MEM_LHEAP | File memory allocated for Local Heap | H5FD_MEM_OHDR | File memory allocated for Object Header |
There are other file memory allocation types that are mapped to the above six basic types. |
hsize_t nsects | IN: The number of free-space sections. |
H5F_sect_info_t *sect_info | IN/OUT: Pointer to instances of H5F_sect_info_t in which the free-space section information is to be returnedAn 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; |
Description:
H5F_GET_FREE_SECTIONS retrieves free-space section information for the free-space manager with type
that is associated with file identifier file_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 H5F_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).
Returns:
Returns the number of free-space sections for the specified free-space manager in the file; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.10.0 | C function introduced in this release. |
--- Last Modified: April 08, 2021 | 09:39 AM