diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-07-27 21:17:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-07-27 21:17:35 (GMT) |
commit | 55ea4084df14d187b308c35b7e0cc42d83e647ee (patch) | |
tree | 6212884eef667e55776a0dd9d9ef34ed9f23e69c /src/H5FLprivate.h | |
parent | 2c8c5f96924b1e143d6047b802eda1aed9003d1c (diff) | |
download | hdf5-55ea4084df14d187b308c35b7e0cc42d83e647ee.zip hdf5-55ea4084df14d187b308c35b7e0cc42d83e647ee.tar.gz hdf5-55ea4084df14d187b308c35b7e0cc42d83e647ee.tar.bz2 |
[svn-r2445] Check in initial coding effort for automatically garbage collecting the free
lists. Each kind of list one has hard-coded limits on when to garbage collect,
which will be replaced with user-controllable knobs (through property list
settings, I think) once I finish debugging some related performance problems.
Diffstat (limited to 'src/H5FLprivate.h')
-rw-r--r-- | src/H5FLprivate.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index e64ba1e..56739e9 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -95,15 +95,16 @@ typedef struct H5FL_blk_head_t { uintn init; /* Whether the free list has been initialized */ uintn allocated; /* Number of blocks allocated */ uintn onlist; /* Number of blocks on free list */ + size_t list_mem; /* Amount of memory in block 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; +} H5FL_blk_head_t; /* * Macros for defining & using priority queues */ /* Declare a free list to manage objects of type 't' */ -#define H5FL_BLK_DEFINE(t) H5FL_blk_head_t t##_pq={0,0,0,#t,NULL} +#define H5FL_BLK_DEFINE(t) H5FL_blk_head_t t##_pq={0,0,0,0,#t,NULL} /* Reference a free list for type 't' defined in another file */ #define H5FL_BLK_EXTERN(t) extern H5FL_blk_head_t t##_pq @@ -134,7 +135,8 @@ typedef struct H5FL_arr_node_t { typedef struct H5FL_arr_head_t { uintn init; /* Whether the free list has been initialized */ uintn allocated; /* Number of blocks allocated */ - uintn onlist; /* Number of blocks on free list */ + uintn *onlist; /* Number of blocks on free list */ + size_t list_mem; /* Amount of memory in block on free list */ const char *name; /* Name of the type */ intn maxelem; /* Maximum number of elements in an array */ size_t size; /* Size of the array elements in the list */ @@ -148,7 +150,7 @@ typedef struct H5FL_arr_head_t { * Macros for defining & using free lists for an array of a type */ /* Declare a free list to manage arrays of type 't' */ -#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,0,#t##"_arr",m,sizeof(t),{NULL}} +#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,NULL,0,#t##"_arr",m,sizeof(t),{NULL}} /* Reference a free list for arrays of type 't' defined in another file */ #define H5FL_ARR_EXTERN(t) extern H5FL_arr_head_t t##_arr_free_list |