11
11
 
 * help@hdfgroup.org.                                                        *
12
12
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13
13
 
14
14
 
/*
15
15
 
 * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
16
16
 
 *         Thursday, March 23, 2000
17
17
 
 *
18
18
 
 * Purpose: Manage priority queues of free-lists (of blocks of bytes).
19
19
 
 *      These are used in various places in the library which allocate and
20
20
 
 *      free differently blocks of bytes repeatedly.  Usually the same size
21
 
-
 *      of block is allocated and freed repeatly in a loop, while writing out
 
21
+
 *      of block is allocated and freed repeatedly in a loop, while writing out
22
22
 
 *      chunked data for example, but the blocks may also be of different sizes
23
23
 
 *      from different datasets and an attempt is made to optimize access to
24
24
 
 *      the proper free list of blocks by using these priority queues to
25
25
 
 *      move frequently accessed free lists to the head of the queue.
26
26
 
 */
27
27
 
28
28
 
/* Interface initialization */
29
29
 
#define H5_INTERFACE_INIT_FUNC  H5FL_init_interface
30
30
 
31
31
 
Show more
448
448
 
    FUNC_ENTER_NOAPI(NULL)
449
449
 
450
450
 
    /* Double check parameters */
451
451
 
    HDassert(head);
452
452
 
453
453
 
    /* Allocate the block */
454
454
 
    if (NULL==(ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT)))
455
455
 
        HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
456
456
 
457
457
 
    /* Clear to zeros */
458
 
-
    /* (Accomodate tracking information, if present) */
 
458
+
    /* (Accommodate tracking information, if present) */
459
459
 
    HDmemset(ret_value,0,head->size - H5FL_TRACK_SIZE);
460
460
 
461
461
 
done:
462
462
 
    FUNC_LEAVE_NOAPI(ret_value)
463
463
 
}   /* end H5FL_reg_calloc() */
464
464
 
465
465
 
466
466
 
/*-------------------------------------------------------------------------
467
467
 
 * Function:    H5FL_reg_gc_list
468
468
 
 *
Show more
2183
2183
 
    FUNC_ENTER_NOAPI_NOINIT
2184
2184
 
2185
2185
 
    /* Double check parameters */
2186
2186
 
    HDassert(head);
2187
2187
 
2188
2188
 
    /* Allocate the block */
2189
2189
 
    if (NULL==(ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT)))
2190
2190
 
        HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
2191
2191
 
2192
2192
 
    /* Clear to zeros */
2193
 
-
    /* (Accomodate tracking information, if present) */
 
2193
+
    /* (Accommodate tracking information, if present) */
2194
2194
 
    HDmemset(ret_value,0,head->size - H5FL_TRACK_SIZE);
2195
2195
 
2196
2196
 
done:
2197
2197
 
    FUNC_LEAVE_NOAPI(ret_value)
2198
2198
 
}   /* end H5FL_fac_calloc() */
2199
2199
 
2200
2200
 
/*-------------------------------------------------------------------------
2201
2201
 
 * Function:    H5FL_fac_gc_list
2202
2202
 
 *
2203
2203
 
 * Purpose: Garbage collect on a particular factory free list