Page tree

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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

JAVA

FORTRAN

C++

C

 

Link

H5_SET_FREE_LIST_LIMITS

Sets free-list size limits.

Procedure:

H5_SET_FREE_LIST_LIMITS(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim)

Signature:

herr_t H5set_free_list_limitsint reg_global_limint reg_list_limint arr_global_limint arr_list_limint blk_global_limint blk_list_lim ) 

Parameters:
int reg_global_lim    IN: The cumulative limit, in bytes, on memory used for all regular free lists 
(Default: 1MB)
int reg_list_limIN: The limit, in bytes, on memory used for each regular free list 
(Default: 64KB)
int arr_global_limIN: The cumulative limit, in bytes, on memory used for all array free lists 
(Default: 4MB)
int arr_list_limIN: The limit, in bytes, on memory used for each array free list 
(Default: 256KB)
int blk_global_limIN: The cumulative limit, in bytes, on memory used for all block free lists and, separately, for all factory free lists 
(Default: 16MB)
int blk_list_limIN: The limit, in bytes, on memory used for each block or factory free list 
(Default: 1MB)

Description:

H5set_free_list_limits sets size limits on all types of free lists. The HDF5 library uses free lists internally to manage memory. The types of free lists used are as follows:

  • Regular free lists manage memory for single internal data structures.
  • Array free lists manage memory for arrays of internal data structures.
  • Block free lists manage memory for arbitrarily-sized blocks of bytes.
  • Factory free lists manage memory for fixed-size blocks of bytes.

The parameters specify global and per-list limits; for example, reg_global_limit and reg_list_limit limit the accumulated size of all regular free lists and the size of each individual regular free list, respectively. Therefore, if an application sets a 1Mb limit on each of the global lists, up to 4Mb of total storage might be allocated, 1Mb for each of the regular, array, block, and factory type lists.

The settings specified for block free lists are duplicated for factory free lists. Therefore, increasing the global limit on block free lists by x bytes will increase the potential free list memory usage by 2x bytes.

Using a value of -1 for a limit means that no limit is set for the specified type of free list.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

examples / h5_subset.c [32:42]  1.10/master  HDFFV/hdf5
int
main (void)
{
    hsize_t     dims[2], dimsm[2];   
    int         data[DIM0][DIM1];           /* data to write */
    int         sdata[DIM0_SUB][DIM1_SUB];  /* subset to write */
    int         rdata[DIM0][DIM1];          /* buffer for read */
 
    hid_t       file_id, dataset_id;        /* handles */
    hid_t       dataspace_id, memspace_id; 

     PROGRAM COMPOUNDEXAMPLE

     USE HDF5 ! This module contains all necessary modules

     IMPLICIT NONE

     CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name
     CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound"     ! Dataset name
     INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset

     INTEGER(HID_T) :: file_id       ! File identifier

c++ / examples / create.cpp [33:43]  1.10/master  HDFFV/hdf5
int main (void)
{
   /*
    * Data initialization.
    */
   int i, j;
   int data[NX][NY];          // buffer for data to write
   for (j = 0; j < NX; j++)
   {
      for (i = 0; i < NY; i++)

public class H5Ex_D_Chunk {
    private static String FILENAME = "H5Ex_D_Chunk.h5";
    private static String DATASETNAME = "DS1";
    private static final int DIM_X = 6;
    private static final int DIM_Y = 8;
    private static final int CHUNK_X = 4;
    private static final int CHUNK_Y = 4;
    private static final int RANK = 2;
    private static final int NDIMS = 2;

History:
Release    C
1.6.0Function introduced in this release.
1.8.3Function changed in this release to set factory free list memory limits.

--- Last Modified: November 01, 2017 | 08:21 AM