H5FLprivate.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*-------------------------------------------------------------------------
00017  *
00018  * Created:             H5FLprivate.h
00019  *                      Mar 23 2000
00020  *                      Quincey Koziol <koziol@ncsa.uiuc.edu>
00021  *
00022  * Purpose:             Private non-prototype header.
00023  *
00024  * Modifications:
00025  *
00026  *-------------------------------------------------------------------------
00027  */
00028 #ifndef _H5FLprivate_H
00029 #define _H5FLprivate_H
00030 
00031 /* Public headers needed by this file */
00032 #ifdef LATER
00033 #include "H5FLpublic.h"         /*API prototypes                             */
00034 #endif /* LATER */
00035 
00036 /* Private headers needed by this file */
00037 
00038 /* Macros for turning off free lists in the library */
00039 /*#define H5_NO_FREE_LISTS*/
00040 #if defined H5_NO_FREE_LISTS || defined H5_USING_MEMCHECKER
00041 #define H5_NO_REG_FREE_LISTS
00042 #define H5_NO_ARR_FREE_LISTS
00043 #define H5_NO_SEQ_FREE_LISTS
00044 #define H5_NO_BLK_FREE_LISTS
00045 #define H5_NO_FAC_FREE_LISTS
00046 #endif /* H5_NO_FREE_LISTS */
00047 
00048 /* Macro to track location where block was allocated from */
00049 /* Uncomment next line to turn on tracking, but don't leave it on after
00050  * debugging is done because of the extra overhead it imposes.
00051  */
00052 /* NOTE: This hasn't been extended to all the free-list allocation routines
00053  * yet. -QAK
00054  */
00055 /* #define H5FL_TRACK */
00056 #ifdef H5FL_TRACK
00057 /* Macro for inclusion in the free list allocation calls */
00058 #define H5FL_TRACK_INFO         ,__FILE__, FUNC, __LINE__
00059 
00060 /* Macro for inclusion in internal free list allocation calls */
00061 #define H5FL_TRACK_INFO_INT     ,call_file, call_func, call_line
00062 
00063 /* Macro for inclusion in the free list allocation parameters */
00064 #define H5FL_TRACK_PARAMS       ,const char *call_file, const char *call_func, int call_line
00065 
00066 /* Forward declarations for structure fields */
00067 struct H5CS_t;
00068 
00069 /* Tracking information for each block */
00070 typedef struct H5FL_track_t {
00071     struct H5CS_t *stack;      /* Function stack */
00072     char *file;         /* Name of file containing calling function */
00073     char *func;         /* Name of calling function */
00074     int line;           /* Line # within calling function */
00075     struct H5FL_track_t *next;  /* Pointer to next tracking block */
00076     struct H5FL_track_t *prev;  /* Pointer to previous tracking block */
00077 } H5FL_track_t;
00078 
00079 /* Macro for size of tracking information */
00080 #define H5FL_TRACK_SIZE sizeof(H5FL_track_t)
00081 
00082 #else /* H5FL_TRACK */
00083 #define H5FL_TRACK_INFO
00084 #define H5FL_TRACK_INFO_INT
00085 #define H5FL_TRACK_PARAMS
00086 #define H5FL_TRACK_SIZE         0
00087 #endif /* H5FL_TRACK */
00088 
00089 /*
00090  * Private datatypes.
00091  */
00092 
00093 /* Data structure to store each block in free list */
00094 typedef struct H5FL_reg_node_t {
00095     struct H5FL_reg_node_t *next;   /* Pointer to next block in free list */
00096 } H5FL_reg_node_t;
00097 
00098 /* Data structure for free list of blocks */
00099 typedef struct H5FL_reg_head_t {
00100     unsigned init;      /* Whether the free list has been initialized */
00101     unsigned allocated; /* Number of blocks allocated */
00102     unsigned onlist;    /* Number of blocks on free list */
00103     const char *name;   /* Name of the type */
00104     size_t size;        /* Size of the blocks in the list */
00105     H5FL_reg_node_t *list;  /* List of free blocks */
00106 } H5FL_reg_head_t;
00107 
00108 /*
00109  * Macros for defining & using free lists for a type
00110  */
00111 #define H5FL_REG_NAME(t)        H5_##t##_reg_free_list
00112 #ifndef H5_NO_REG_FREE_LISTS
00113 /* Common macros for H5FL_DEFINE & H5FL_DEFINE_STATIC */
00114 #define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t)={0,0,0,#t,sizeof(t),NULL}
00115 
00116 /* Declare a free list to manage objects of type 't' */
00117 #define H5FL_DEFINE(t) H5_DLL H5FL_DEFINE_COMMON(t)
00118 
00119 /* Reference a free list for type 't' defined in another file */
00120 #define H5FL_EXTERN(t)  H5_DLLVAR H5FL_reg_head_t H5FL_REG_NAME(t)
00121 
00122 /* Declare a static free list to manage objects of type 't' */
00123 #define H5FL_DEFINE_STATIC(t)  static H5FL_DEFINE_COMMON(t)
00124 
00125 /* Allocate an object of type 't' */
00126 #define H5FL_MALLOC(t) (t *)H5FL_reg_malloc(&(H5FL_REG_NAME(t)) H5FL_TRACK_INFO)
00127 
00128 /* Allocate an object of type 't' and clear it to all zeros */
00129 #define H5FL_CALLOC(t) (t *)H5FL_reg_calloc(&(H5FL_REG_NAME(t)) H5FL_TRACK_INFO)
00130 
00131 /* Free an object of type 't' */
00132 #define H5FL_FREE(t,obj) (t *)H5FL_reg_free(&(H5FL_REG_NAME(t)),obj)
00133 
00134 /* Re-allocating an object of type 't' is not defined, because these free-lists
00135  * only support fixed sized types, like structs, etc..
00136  */
00137 
00138 #else /* H5_NO_REG_FREE_LISTS */
00139 #include "H5MMprivate.h"
00140 /* Common macro for H5FL_DEFINE & H5FL_DEFINE_STATIC */
00141 #define H5FL_DEFINE_COMMON(t) int UNUSED H5FL_REG_NAME(t)
00142 
00143 #define H5FL_DEFINE(t)  H5_DLL H5FL_DEFINE_COMMON(t)
00144 #define H5FL_EXTERN(t)  H5_DLLVAR H5FL_DEFINE_COMMON(t)
00145 #define H5FL_DEFINE_STATIC(t)  static H5FL_DEFINE_COMMON(t)
00146 #define H5FL_MALLOC(t) (t *)H5MM_malloc(sizeof(t))
00147 #define H5FL_CALLOC(t) (t *)H5MM_calloc(sizeof(t))
00148 #define H5FL_FREE(t,obj) H5MM_xfree(obj)
00149 #endif /* H5_NO_REG_FREE_LISTS */
00150 
00151 /* Data structure to store information about each block allocated */
00152 typedef union H5FL_blk_list_t {
00153     size_t size;                /* Size of the page */
00154     union H5FL_blk_list_t *next;   /* Pointer to next block in free list */
00155     double unused1;         /* Unused normally, just here for aligment */
00156     haddr_t unused2;        /* Unused normally, just here for aligment */
00157 } H5FL_blk_list_t;
00158 
00159 /* Data structure for priority queue node of block free lists */
00160 typedef struct H5FL_blk_node_t {
00161     size_t size;                /* Size of the blocks in the list */
00162     H5FL_blk_list_t *list;      /* List of free blocks */
00163     struct H5FL_blk_node_t *next;    /* Pointer to next free list in queue */
00164     struct H5FL_blk_node_t *prev;    /* Pointer to previous free list in queue */
00165 } H5FL_blk_node_t;
00166 
00167 /* Data structure for priority queue of native block free lists */
00168 typedef struct H5FL_blk_head_t {
00169     unsigned init;         /* Whether the free list has been initialized */
00170     unsigned allocated;    /* Number of blocks allocated */
00171     unsigned onlist;       /* Number of blocks on free list */
00172     size_t list_mem;    /* Amount of memory in block on free list */
00173     const char *name;   /* Name of the type */
00174     H5FL_blk_node_t *head;  /* Pointer to first free list in queue */
00175 } H5FL_blk_head_t;
00176 
00177 /*
00178  * Macros for defining & using priority queues
00179  */
00180 #define H5FL_BLK_NAME(t)        H5_##t##_blk_free_list
00181 #ifndef H5_NO_BLK_FREE_LISTS
00182 /* Common macro for H5FL_BLK_DEFINE & H5FL_BLK_DEFINE_STATIC */
00183 #define H5FL_BLK_DEFINE_COMMON(t) H5FL_blk_head_t H5FL_BLK_NAME(t)={0,0,0,0,#t"_blk",NULL}
00184 
00185 /* Declare a free list to manage objects of type 't' */
00186 #define H5FL_BLK_DEFINE(t)  H5_DLL H5FL_BLK_DEFINE_COMMON(t)
00187 
00188 /* Reference a free list for type 't' defined in another file */
00189 #define H5FL_BLK_EXTERN(t)  H5_DLLVAR H5FL_blk_head_t H5FL_BLK_NAME(t)
00190 
00191 /* Declare a static free list to manage objects of type 't' */
00192 #define H5FL_BLK_DEFINE_STATIC(t)  static H5FL_BLK_DEFINE_COMMON(t)
00193 
00194 /* Allocate an block of type 't' */
00195 #define H5FL_BLK_MALLOC(t,size) (uint8_t *)H5FL_blk_malloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO)
00196 
00197 /* Allocate an block of type 't' and clear it to zeros */
00198 #define H5FL_BLK_CALLOC(t,size) (uint8_t *)H5FL_blk_calloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO)
00199 
00200 /* Free a block of type 't' */
00201 #define H5FL_BLK_FREE(t,blk) (uint8_t *)H5FL_blk_free(&(H5FL_BLK_NAME(t)),blk)
00202 
00203 /* Re-allocate a block of type 't' */
00204 #define H5FL_BLK_REALLOC(t,blk,new_size) (uint8_t *)H5FL_blk_realloc(&(H5FL_BLK_NAME(t)),blk,new_size H5FL_TRACK_INFO)
00205 
00206 /* Check if there is a free block available to re-use */
00207 #define H5FL_BLK_AVAIL(t,size)  H5FL_blk_free_block_avail(&(H5FL_BLK_NAME(t)),size)
00208 
00209 #else /* H5_NO_BLK_FREE_LISTS */
00210 /* Common macro for H5FL_BLK_DEFINE & H5FL_BLK_DEFINE_STATIC */
00211 #define H5FL_BLK_DEFINE_COMMON(t) int UNUSED H5FL_BLK_NAME(t)
00212 
00213 #define H5FL_BLK_DEFINE(t)      H5_DLL H5FL_BLK_DEFINE_COMMON(t)
00214 #define H5FL_BLK_EXTERN(t)      H5_DLLVAR H5FL_BLK_DEFINE_COMMON(t)
00215 #define H5FL_BLK_DEFINE_STATIC(t)  static H5FL_BLK_DEFINE_COMMON(t)
00216 #define H5FL_BLK_MALLOC(t,size) (uint8_t *)H5MM_malloc(size)
00217 #define H5FL_BLK_CALLOC(t,size) (uint8_t *)H5MM_calloc(size)
00218 #define H5FL_BLK_FREE(t,blk) H5MM_xfree(blk)
00219 #define H5FL_BLK_REALLOC(t,blk,new_size) (uint8_t *)H5MM_realloc(blk,new_size)
00220 #define H5FL_BLK_AVAIL(t,size)  (FALSE)
00221 #endif /* H5_NO_BLK_FREE_LISTS */
00222 
00223 /* Data structure to store each array in free list */
00224 typedef union H5FL_arr_list_t {
00225     union H5FL_arr_list_t *next;   /* Pointer to next block in free list */
00226     size_t nelem;               /* Number of elements in this array */
00227     double unused1;             /* Unused normally, just here for aligment */
00228     haddr_t unused2;            /* Unused normally, just here for aligment */
00229 } H5FL_arr_list_t;
00230 
00231 /* Data structure for each size of array element */
00232 typedef struct H5FL_arr_node_t {
00233     size_t size;                /* Size of the blocks in the list */
00234     unsigned onlist;            /* Number of blocks on free list */
00235     H5FL_arr_list_t *list;      /* List of free blocks */
00236 } H5FL_arr_node_t;
00237 
00238 /* Data structure for free list of array blocks */
00239 typedef struct H5FL_arr_head_t {
00240     unsigned init;         /* Whether the free list has been initialized */
00241     unsigned allocated;    /* Number of blocks allocated */
00242     size_t list_mem;       /* Amount of memory in block on free list */
00243     const char *name;      /* Name of the type */
00244     int  maxelem;          /* Maximum number of elements in an array */
00245     size_t base_size;      /* Size of the "base" object in the list */
00246     size_t elem_size;      /* Size of the array elements in the list */
00247     H5FL_arr_node_t *list_arr;  /* Array of lists of free blocks */
00248 } H5FL_arr_head_t;
00249 
00250 /*
00251  * Macros for defining & using free lists for an array of a type
00252  */
00253 #define H5FL_ARR_NAME(t)        H5_##t##_arr_free_list
00254 #ifndef H5_NO_ARR_FREE_LISTS
00255 /* Common macro for H5FL_ARR_DEFINE & H5FL_ARR_DEFINE_STATIC (and H5FL_BARR variants) */
00256 #define H5FL_ARR_DEFINE_COMMON(b,t,m) H5FL_arr_head_t H5FL_ARR_NAME(t)={0,0,0,#t"_arr",m+1,b,sizeof(t),NULL}
00257 
00258 /* Declare a free list to manage arrays of type 't' */
00259 #define H5FL_ARR_DEFINE(t,m)  H5_DLL H5FL_ARR_DEFINE_COMMON(0,t,m)
00260 
00261 /* Declare a free list to manage base 'b' + arrays of type 't' */
00262 #define H5FL_BARR_DEFINE(b,t,m)  H5_DLL H5FL_ARR_DEFINE_COMMON(sizeof(b),t,m)
00263 
00264 /* Reference a free list for arrays of type 't' defined in another file */
00265 #define H5FL_ARR_EXTERN(t)  H5_DLLVAR H5FL_arr_head_t H5FL_ARR_NAME(t)
00266 
00267 /* Declare a static free list to manage arrays of type 't' */
00268 #define H5FL_ARR_DEFINE_STATIC(t,m)  static H5FL_ARR_DEFINE_COMMON(0,t,m)
00269 
00270 /* Declare a static free list to manage base 'b' + arrays of type 't' */
00271 #define H5FL_BARR_DEFINE_STATIC(b,t,m)  static H5FL_ARR_DEFINE_COMMON(sizeof(b),t,m)
00272 
00273 /* Allocate an array of type 't' */
00274 #define H5FL_ARR_MALLOC(t,elem) H5FL_arr_malloc(&(H5FL_ARR_NAME(t)),elem)
00275 
00276 /* Allocate an array of type 't' and clear it to all zeros */
00277 #define H5FL_ARR_CALLOC(t,elem) H5FL_arr_calloc(&(H5FL_ARR_NAME(t)),elem)
00278 
00279 /* Free an array of type 't' */
00280 #define H5FL_ARR_FREE(t,obj) H5FL_arr_free(&(H5FL_ARR_NAME(t)),obj)
00281 
00282 /* Re-allocate an array of type 't' */
00283 #define H5FL_ARR_REALLOC(t,obj,new_elem) H5FL_arr_realloc(&(H5FL_ARR_NAME(t)),obj,new_elem)
00284 
00285 #else /* H5_NO_ARR_FREE_LISTS */
00286 /* Common macro for H5FL_ARR_DEFINE & H5FL_ARR_DEFINE_STATIC (and H5FL_BARR variants) */
00287 #define H5FL_ARR_DEFINE_COMMON(t,m) size_t H5FL_ARR_NAME(t)
00288 
00289 #define H5FL_ARR_DEFINE(t,m)    H5_DLL H5FL_ARR_DEFINE_COMMON(t,m) = 0
00290 #define H5FL_BARR_DEFINE(b,t,m) H5_DLL H5FL_ARR_DEFINE_COMMON(t,m) = sizeof(b)
00291 #define H5FL_ARR_EXTERN(t)      H5_DLLVAR H5FL_ARR_DEFINE_COMMON(t,m)
00292 #define H5FL_ARR_DEFINE_STATIC(t,m)  static H5FL_ARR_DEFINE_COMMON(t,m) = 0
00293 #define H5FL_BARR_DEFINE_STATIC(b,t,m)  static H5FL_ARR_DEFINE_COMMON(t,m) = sizeof(b)
00294 #define H5FL_ARR_MALLOC(t,elem) H5MM_malloc(H5FL_ARR_NAME(t) + ((elem)*sizeof(t)))
00295 #define H5FL_ARR_CALLOC(t,elem) H5MM_calloc(H5FL_ARR_NAME(t) + ((elem)*sizeof(t)))
00296 #define H5FL_ARR_FREE(t,obj) H5MM_xfree(obj)
00297 #define H5FL_ARR_REALLOC(t,obj,new_elem) H5MM_realloc(obj,H5FL_ARR_NAME(t) + ((new_elem)*sizeof(t)))
00298 #endif /* H5_NO_ARR_FREE_LISTS */
00299 
00300 /* Data structure for free list of sequence blocks */
00301 typedef struct H5FL_seq_head_t {
00302     H5FL_blk_head_t queue;      /* Priority queue of sequence blocks */
00303     size_t size;                /* Size of the sequence elements in the list */
00304 } H5FL_seq_head_t;
00305 
00306 /*
00307  * Macros for defining & using free lists for a sequence of a type
00308  *
00309  * Sequences are like arrays, except they have no upper limit.
00310  *
00311  */
00312 #define H5FL_SEQ_NAME(t)        H5_##t##_seq_free_list
00313 #ifndef H5_NO_SEQ_FREE_LISTS
00314 /* Common macro for H5FL_SEQ_DEFINE & H5FL_SEQ_DEFINE_STATIC */
00315 #define H5FL_SEQ_DEFINE_COMMON(t) H5FL_seq_head_t H5FL_SEQ_NAME(t)={{0,0,0,0,#t"_seq",NULL},sizeof(t)}
00316 
00317 /* Declare a free list to manage sequences of type 't' */
00318 #define H5FL_SEQ_DEFINE(t)  H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
00319 
00320 /* Reference a free list for sequences of type 't' defined in another file */
00321 #define H5FL_SEQ_EXTERN(t)  H5_DLLVAR H5FL_seq_head_t H5FL_SEQ_NAME(t)
00322 
00323 /* Declare a static free list to manage sequences of type 't' */
00324 #define H5FL_SEQ_DEFINE_STATIC(t)  static H5FL_SEQ_DEFINE_COMMON(t)
00325 
00326 /* Allocate a sequence of type 't' */
00327 #define H5FL_SEQ_MALLOC(t,elem) (t *)H5FL_seq_malloc(&(H5FL_SEQ_NAME(t)),elem H5FL_TRACK_INFO)
00328 
00329 /* Allocate a sequence of type 't' and clear it to all zeros */
00330 #define H5FL_SEQ_CALLOC(t,elem) (t *)H5FL_seq_calloc(&(H5FL_SEQ_NAME(t)),elem H5FL_TRACK_INFO)
00331 
00332 /* Free a sequence of type 't' */
00333 #define H5FL_SEQ_FREE(t,obj) H5FL_seq_free(&(H5FL_SEQ_NAME(t)),obj)
00334 
00335 /* Re-allocate a sequence of type 't' */
00336 #define H5FL_SEQ_REALLOC(t,obj,new_elem) (t *)H5FL_seq_realloc(&(H5FL_SEQ_NAME(t)),obj,new_elem H5FL_TRACK_INFO)
00337 
00338 #else /* H5_NO_SEQ_FREE_LISTS */
00339 /* Common macro for H5FL_SEQ_DEFINE & H5FL_SEQ_DEFINE_STATIC */
00340 #define H5FL_SEQ_DEFINE_COMMON(t) int UNUSED H5FL_SEQ_NAME(t)
00341 
00342 #define H5FL_SEQ_DEFINE(t)      H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
00343 #define H5FL_SEQ_EXTERN(t)      H5_DLLVAR H5FL_SEQ_DEFINE_COMMON(t)
00344 #define H5FL_SEQ_DEFINE_STATIC(t)  static H5FL_SEQ_DEFINE_COMMON(t)
00345 #define H5FL_SEQ_MALLOC(t,elem) (t *)H5MM_malloc((elem)*sizeof(t))
00346 #define H5FL_SEQ_CALLOC(t,elem) (t *)H5MM_calloc((elem)*sizeof(t))
00347 #define H5FL_SEQ_FREE(t,obj) H5MM_xfree(obj)
00348 #define H5FL_SEQ_REALLOC(t,obj,new_elem) (t *)H5MM_realloc(obj,(new_elem)*sizeof(t))
00349 #endif /* H5_NO_SEQ_FREE_LISTS */
00350 
00351 /* Forward declarations of the data structures for free list block factory */
00352 typedef struct H5FL_fac_gc_node_t H5FL_fac_gc_node_t;
00353 typedef struct H5FL_fac_node_t H5FL_fac_node_t;
00354 
00355 /* Data structure for free list block factory */
00356 typedef struct H5FL_fac_head_t {
00357     unsigned init;      /* Whether the free list has been initialized */
00358     unsigned allocated; /* Number of blocks allocated */
00359     unsigned onlist;    /* Number of blocks on free list */
00360     size_t size;        /* Size of the blocks in the list */
00361     H5FL_fac_node_t *list;  /* List of free blocks */
00362     H5FL_fac_gc_node_t *prev_gc; /* Previous garbage collection node in list */
00363 } H5FL_fac_head_t;
00364 
00365 
00366 /*
00367  * Macros for defining & using free list factories
00368  *
00369  * Factories are dynamically created free list managers for blocks of
00370  *      a particular size.
00371  *
00372  */
00373 #ifndef H5_NO_FAC_FREE_LISTS
00374 /* Allocate a block from a factory */
00375 #define H5FL_FAC_MALLOC(t) H5FL_fac_malloc(t H5FL_TRACK_INFO)
00376 
00377 /* Allocate a block from a factory and clear it to all zeros */
00378 #define H5FL_FAC_CALLOC(t) H5FL_fac_calloc(t H5FL_TRACK_INFO)
00379 
00380 /* Return a block to a factory */
00381 #define H5FL_FAC_FREE(t,obj) H5FL_fac_free(t,obj)
00382 
00383 #else /* H5_NO_FAC_FREE_LISTS */
00384 #define H5FL_FAC_MALLOC(t) H5MM_malloc(t->size)
00385 #define H5FL_FAC_CALLOC(t) H5MM_calloc(t->size)
00386 #define H5FL_FAC_FREE(t,obj) H5MM_xfree(obj)
00387 #endif /* H5_NO_FAC_FREE_LISTS */
00388 
00389 /*
00390  * Library prototypes.
00391  */
00392  /* Block free lists */
00393 H5_DLL void * H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS);
00394 H5_DLL void * H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS);
00395 H5_DLL void * H5FL_blk_free(H5FL_blk_head_t *head, void *block);
00396 H5_DLL void * H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_PARAMS);
00397 H5_DLL htri_t H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size);
00398 
00399 /* Regular free lists */
00400 H5_DLL void * H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
00401 H5_DLL void * H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
00402 H5_DLL void * H5FL_reg_free(H5FL_reg_head_t *head, void *obj);
00403 
00404 /* Array free lists */
00405 H5_DLL void * H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem);
00406 H5_DLL void * H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem);
00407 H5_DLL void * H5FL_arr_free(H5FL_arr_head_t *head, void *obj);
00408 H5_DLL void * H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem);
00409 
00410 /* Sequence free lists */
00411 H5_DLL void * H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
00412 H5_DLL void * H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
00413 H5_DLL void * H5FL_seq_free(H5FL_seq_head_t *head, void *obj);
00414 H5_DLL void * H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PARAMS);
00415 
00416 /* Factory free lists */
00417 H5_DLL H5FL_fac_head_t *H5FL_fac_init(size_t size);
00418 H5_DLL void * H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
00419 H5_DLL void * H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
00420 H5_DLL void * H5FL_fac_free(H5FL_fac_head_t *head, void *obj);
00421 H5_DLL herr_t H5FL_fac_term(H5FL_fac_head_t *head);
00422 
00423 /* General free list routines */
00424 H5_DLL herr_t H5FL_garbage_coll(void);
00425 H5_DLL herr_t H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim,
00426     int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim,
00427     int fac_global_lim, int fac_list_lim);
00428 H5_DLL int   H5FL_term_interface(void);
00429 
00430 #endif