1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
* Purpose: Query routines for global heaps.
*
*/
/****************/
/* Module Setup */
/****************/
#include "H5HGmodule.h" /* This source code file is part of the H5HG module */
/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5HGpkg.h" /* Global heaps */
/****************/
/* Local Macros */
/****************/
/******************/
/* Local Typedefs */
/******************/
/********************/
/* Package Typedefs */
/********************/
/********************/
/* Local Prototypes */
/********************/
/*********************/
/* Package Variables */
/*********************/
/*****************************/
/* Library Private Variables */
/*****************************/
/*******************/
/* Local Variables */
/*******************/
/*-------------------------------------------------------------------------
* Function: H5HG_get_addr
*
* Purpose: Query the address of a global heap object.
*
* Return: Address of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
haddr_t
H5HG_get_addr(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->addr)
} /* H5HG_get_addr() */
/*-------------------------------------------------------------------------
* Function: H5HG_get_size
*
* Purpose: Query the size of a global heap object.
*
* Return: Size of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
size_t
H5HG_get_size(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->size)
} /* H5HG_get_size() */
/*-------------------------------------------------------------------------
* Function: H5HG_get_free_size
*
* Purpose: Query the free size of a global heap object.
*
* Return: Free size of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
size_t
H5HG_get_free_size(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->obj[0].size)
} /* H5HG_get_free_size() */
|