Source
printf("H5FL_reg_term: head->name=%s, head->allocated=%d\n", H5FL_reg_gc_head.first->list->name,(int)H5FL_reg_gc_head.first->list->allocated);
/*
* Copyright (C) 2000-2001 NCSA
* All rights reserved.
*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Thursday, March 23, 2000
*
* Purpose: Manage priority queues of free-lists (of blocks of bytes).
* These are used in various places in the library which allocate and
* free differently blocks of bytes repeatedly. Usually the same size
* of block is allocated and freed repeatly in a loop, while writing out
* chunked data for example, but the blocks may also be of different sizes
* from different datasets and an attempt is made to optimize access to
* the proper free list of blocks by using these priority queues to
* move frequently accessed free lists to the head of the queue.
*/
/* #define H5FL_DEBUG */
static int interface_initialize_g = 0;
/*
* Private type definitions
*/
/*
Default limits on how much memory can accumulate on each free list before
it is garbage collected.
*/
static size_t H5FL_reg_glb_mem_lim=1*16*65536;/* Default to 1MB limit on all regular free lists */
static size_t H5FL_reg_lst_mem_lim=1*65536; /* Default to 64KB limit on each regular free list */
static size_t H5FL_arr_glb_mem_lim=4*16*65536;/* Default to 4MB limit on all array free lists */
static size_t H5FL_arr_lst_mem_lim=4*65536; /* Default to 256KB limit on each array free list */
static size_t H5FL_blk_glb_mem_lim=16*16*65536; /* Default to 16MB limit on all block free lists */
static size_t H5FL_blk_lst_mem_lim=16*65536; /* Default to 1024KB (1MB) limit on each block free list */
/* A garbage collection node for regular free lists */
typedef struct H5FL_reg_gc_node_t {
H5FL_reg_head_t *list; /* Pointer to the head of the list to garbage collect */
struct H5FL_reg_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
} H5FL_reg_gc_node_t;
/* The garbage collection head for regular free lists */
typedef struct H5FL_reg_gc_list_t {