diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-07-08 21:24:55 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-07-08 21:24:55 (GMT) |
commit | 185ec14f360efb80eb4638cc3745834a141280e1 (patch) | |
tree | 1355143d703d710f6c1a9fc43f120c1b89f9db7f /src/H5FLprivate.h | |
parent | 50ef7ff9962051c767aae7ad229b558b7586c59b (diff) | |
download | hdf5-185ec14f360efb80eb4638cc3745834a141280e1.zip hdf5-185ec14f360efb80eb4638cc3745834a141280e1.tar.gz hdf5-185ec14f360efb80eb4638cc3745834a141280e1.tar.bz2 |
Normalization of H5MM and H5FL with develop. Adds the new
stats calls.
Diffstat (limited to 'src/H5FLprivate.h')
-rw-r--r-- | src/H5FLprivate.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index 4aa44f9..94a51e5 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -157,6 +157,8 @@ typedef union H5FL_blk_list_t { /* Data structure for priority queue node of block free lists */ typedef struct H5FL_blk_node_t { size_t size; /* Size of the blocks in the list */ + unsigned allocated; /* Number of blocks of this size allocated */ + unsigned onlist; /* Number of blocks on free list */ H5FL_blk_list_t *list; /* List of free blocks */ struct H5FL_blk_node_t *next; /* Pointer to next free list in queue */ struct H5FL_blk_node_t *prev; /* Pointer to previous free list in queue */ @@ -165,9 +167,9 @@ typedef struct H5FL_blk_node_t { /* Data structure for priority queue of native block free lists */ typedef struct H5FL_blk_head_t { hbool_t init; /* Whether the free list has been initialized */ - unsigned allocated; /* Number of blocks allocated */ - unsigned onlist; /* Number of blocks on free list */ - size_t list_mem; /* Amount of memory in block on free list */ + unsigned allocated; /* Total number of blocks allocated */ + unsigned onlist; /* Total number of blocks on free list */ + size_t list_mem; /* Total amount of memory in blocks on free list */ const char *name; /* Name of the type */ H5FL_blk_node_t *head; /* Pointer to first free list in queue */ } H5FL_blk_head_t; @@ -189,10 +191,10 @@ typedef struct H5FL_blk_head_t { /* Declare a static free list to manage objects of type 't' */ #define H5FL_BLK_DEFINE_STATIC(t) static H5FL_BLK_DEFINE_COMMON(t) -/* Allocate an block of type 't' */ +/* Allocate a block of type 't' */ #define H5FL_BLK_MALLOC(t,size) (uint8_t *)H5FL_blk_malloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO) -/* Allocate an block of type 't' and clear it to zeros */ +/* Allocate a block of type 't' and clear it to zeros */ #define H5FL_BLK_CALLOC(t,size) (uint8_t *)H5FL_blk_calloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO) /* Free a block of type 't' */ @@ -228,7 +230,9 @@ typedef union H5FL_arr_list_t { /* Data structure for each size of array element */ typedef struct H5FL_arr_node_t { - size_t size; /* Size of the blocks in the list */ + size_t size; /* Size of the blocks in the list (in bytes) */ + /* (Note: base_size + <# of elem> * elem_size) */ + unsigned allocated; /* Number of blocks allocated of this element size */ unsigned onlist; /* Number of blocks on free list */ H5FL_arr_list_t *list; /* List of free blocks */ } H5FL_arr_node_t; @@ -236,7 +240,7 @@ typedef struct H5FL_arr_node_t { /* Data structure for free list of array blocks */ typedef struct H5FL_arr_head_t { hbool_t init; /* Whether the free list has been initialized */ - unsigned allocated; /* Number of blocks allocated */ + unsigned allocated; /* Total number of blocks allocated */ size_t list_mem; /* Amount of memory in block on free list */ const char *name; /* Name of the type */ int maxelem; /* Maximum number of elements in an array */ @@ -423,6 +427,8 @@ H5_DLL herr_t H5FL_garbage_coll(void); H5_DLL herr_t H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim, int fac_global_lim, int fac_list_lim); +H5_DLL herr_t H5FL_get_free_list_sizes(size_t *reg_size, size_t *arr_size, + size_t *blk_size, size_t *fac_size); H5_DLL int H5FL_term_interface(void); #endif |