1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
---|
2 | * Copyright by The HDF Group. * |
---|
3 | * Copyright by the Board of Trustees of the University of Illinois. * |
---|
4 | * All rights reserved. * |
---|
5 | * * |
---|
6 | * This file is part of HDF5. The full HDF5 copyright notice, including * |
---|
7 | * terms governing use, modification, and redistribution, is contained in * |
---|
8 | * the files COPYING and Copyright.html. COPYING can be found at the root * |
---|
9 | * of the source code distribution tree; Copyright.html can be found at the * |
---|
10 | * root level of an installed copy of the electronic HDF5 document set and * |
---|
11 | * is linked from the top-level documents page. It can also be found at * |
---|
12 | * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * |
---|
13 | * access to either file, you may request a copy from help@hdfgroup.org. * |
---|
14 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
---|
15 | |
---|
16 | /* |
---|
17 | * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> |
---|
18 | * Wednesday, July 9, 2003 |
---|
19 | * |
---|
20 | * Purpose: This file contains declarations which are visible |
---|
21 | * only within the H5HL package. Source files outside the |
---|
22 | * H5HL package should include H5HLprivate.h instead. |
---|
23 | */ |
---|
24 | #ifndef H5HL_PACKAGE |
---|
25 | #error "Do not include this file outside the H5HL package!" |
---|
26 | #endif |
---|
27 | |
---|
28 | #ifndef _H5HLpkg_H |
---|
29 | #define _H5HLpkg_H |
---|
30 | |
---|
31 | /* Get package's private header */ |
---|
32 | #include "H5HLprivate.h" |
---|
33 | |
---|
34 | /* Other private headers needed by this file */ |
---|
35 | |
---|
36 | /*****************************/ |
---|
37 | /* Package Private Variables */ |
---|
38 | /*****************************/ |
---|
39 | |
---|
40 | /* The cache subclass */ |
---|
41 | H5_DLLVAR const H5AC_class_t H5AC_LHEAP[1]; |
---|
42 | |
---|
43 | /**************************/ |
---|
44 | /* Package Private Macros */ |
---|
45 | /**************************/ |
---|
46 | |
---|
47 | #define H5HL_SIZEOF_HDR(F) \ |
---|
48 | H5HL_ALIGN(H5HL_SIZEOF_MAGIC + /*heap signature */ \ |
---|
49 | 4 + /*reserved */ \ |
---|
50 | H5F_SIZEOF_SIZE (F) + /*data size */ \ |
---|
51 | H5F_SIZEOF_SIZE (F) + /*free list head */ \ |
---|
52 | H5F_SIZEOF_ADDR (F)) /*data address */ |
---|
53 | |
---|
54 | /****************************/ |
---|
55 | /* Package Private Typedefs */ |
---|
56 | /****************************/ |
---|
57 | |
---|
58 | typedef struct H5HL_free_t { |
---|
59 | size_t offset; /*offset of free block */ |
---|
60 | size_t size; /*size of free block */ |
---|
61 | struct H5HL_free_t *prev; /*previous entry in free list */ |
---|
62 | struct H5HL_free_t *next; /*next entry in free list */ |
---|
63 | } H5HL_free_t; |
---|
64 | |
---|
65 | struct H5HL_t { |
---|
66 | H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */ |
---|
67 | /* first field in structure */ |
---|
68 | haddr_t addr; /*address of data */ |
---|
69 | size_t heap_alloc; /*size of heap on disk and in mem */ |
---|
70 | uint8_t *chunk; /*the chunk, including header */ |
---|
71 | H5HL_free_t *freelist; /*the free list */ |
---|
72 | }; |
---|
73 | |
---|
74 | /******************************/ |
---|
75 | /* Package Private Prototypes */ |
---|
76 | /******************************/ |
---|
77 | |
---|
78 | #endif |
---|
79 | |
---|
80 | |
---|