25
25
 
#error "Do not include this file outside the H5HL package!"
26
26
 
#endif
27
27
 
28
28
 
#ifndef _H5HLpkg_H
29
29
 
#define _H5HLpkg_H
30
30
 
31
31
 
/* Get package's private header */
32
32
 
#include "H5HLprivate.h"
33
33
 
34
34
 
/* Other private headers needed by this file */
 
35
+
#include "H5ACprivate.h"    /* Metadata cache           */
 
36
+
#include "H5FLprivate.h"    /* Free lists                           */
 
37
+
35
38
 
36
39
 
/*****************************/
37
40
 
/* Package Private Variables */
38
41
 
/*****************************/
39
42
 
40
43
 
/* The cache subclass */
41
44
 
H5_DLLVAR const H5AC_class_t H5AC_LHEAP[1];
42
45
 
 
46
+
/* Declare extern the free list to manage the H5HL_free_t struct */
 
47
+
H5FL_EXTERN(H5HL_free_t);
 
48
+
 
49
+
/* Declare extern the free list to manage the H5HL_t struct */
 
50
+
H5FL_EXTERN(H5HL_t);
 
51
+
 
52
+
/* Declare extern the PQ free list to manage the heap chunk information */
 
53
+
H5FL_BLK_EXTERN(lheap_chunk);
 
54
+
 
55
+
43
56
 
/**************************/
44
57
 
/* Package Private Macros */
45
58
 
/**************************/
46
59
 
47
60
 
#define H5HL_SIZEOF_HDR(F)                            \
48
61
 
    H5HL_ALIGN(H5_SIZEOF_MAGIC +    /*heap signature        */    \
49
62
 
           4 +          /*reserved          */    \
50
63
 
           H5F_SIZEOF_SIZE (F) +    /*data size         */    \
51
64
 
           H5F_SIZEOF_SIZE (F) +    /*free list head        */    \
52
65
 
           H5F_SIZEOF_ADDR (F)) /*data address          */
53
66
 
 
67
+
54
68
 
/****************************/
55
69
 
/* Package Private Typedefs */
56
70
 
/****************************/
57
71
 
58
72
 
typedef struct H5HL_free_t {
59
73
 
    size_t      offset;     /*offset of free block      */
60
74
 
    size_t      size;       /*size of free block        */
61
75
 
    struct H5HL_free_t  *prev;      /*previous entry in free list   */
62
76
 
    struct H5HL_free_t  *next;      /*next entry in free list   */
63
77
 
} H5HL_free_t;
64
78
 
65
79
 
struct H5HL_t {
66
80
 
    H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
67
81
 
                            /* first field in structure */
68
82
 
    haddr_t         addr;   /*address of data       */
69
83
 
    size_t          heap_alloc; /*size of heap on disk and in mem */
70
84
 
    uint8_t        *chunk;  /*the chunk, including header   */
71
85
 
    H5HL_free_t        *freelist;   /*the free list         */
72
86
 
};
73
87
 
 
88
+
74
89
 
/******************************/
75
90
 
/* Package Private Prototypes */
76
91
 
/******************************/
77
92
 
78
 
-
#endif
 
93
+
H5_DLL herr_t H5HL_dest(H5F_t *f, H5HL_t *heap);
 
94
+
H5_DLL herr_t H5HL_size(const H5F_t *f, const H5HL_t *heap, size_t *size_ptr);
79
95
 
 
96
+
#endif /* _H5HLpkg_H */
80
97