RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
score
heapinfo.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
11
12
/*
13
* COPYRIGHT (c) 1989-2006.
14
* On-Line Applications Research Corporation (OAR).
15
*
16
* Redistribution and use in source and binary forms, with or without
17
* modification, are permitted provided that the following conditions
18
* are met:
19
* 1. Redistributions of source code must retain the above copyright
20
* notice, this list of conditions and the following disclaimer.
21
* 2. Redistributions in binary form must reproduce the above copyright
22
* notice, this list of conditions and the following disclaimer in the
23
* documentation and/or other materials provided with the distribution.
24
*
25
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
* POSSIBILITY OF SUCH DAMAGE.
36
*/
37
38
#ifndef _RTEMS_SCORE_HEAPINFO_H
39
#define _RTEMS_SCORE_HEAPINFO_H
40
41
#include <stdint.h>
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
52
60
typedef
struct
{
66
uint64_t
lifetime_allocated
;
67
73
uint64_t
lifetime_freed
;
74
80
uintptr_t
size
;
81
87
uintptr_t
free_size
;
88
94
uintptr_t
min_free_size
;
95
99
uint32_t
free_blocks
;
100
104
uint32_t
max_free_blocks
;
105
109
uint32_t
used_blocks
;
110
114
uint32_t
max_search
;
115
119
uint32_t
searches
;
120
124
uint32_t
allocs
;
125
129
uint32_t
failed_allocs
;
130
134
uint32_t
frees
;
135
139
uint32_t
resizes
;
140
}
Heap_Statistics
;
141
145
typedef
struct
{
149
uintptr_t
number
;
150
154
uintptr_t
largest
;
155
159
uintptr_t
total
;
160
}
Heap_Information
;
161
165
typedef
struct
{
166
Heap_Information
Free;
167
Heap_Information
Used;
168
Heap_Statistics
Stats;
169
}
Heap_Information_block
;
170
172
173
#ifdef __cplusplus
174
}
175
#endif
176
177
#endif
178
/* end of include file */
Heap_Information_block
Information block returned by _Heap_Get_information().
Definition
heapinfo.h:165
Heap_Information
Information about blocks.
Definition
heapinfo.h:145
Heap_Information::total
uintptr_t total
Total size of the blocks of this type.
Definition
heapinfo.h:159
Heap_Information::largest
uintptr_t largest
Largest block of this type.
Definition
heapinfo.h:154
Heap_Information::number
uintptr_t number
Number of blocks of this type.
Definition
heapinfo.h:149
Heap_Statistics
Run-time heap statistics.
Definition
heapinfo.h:60
Heap_Statistics::searches
uint32_t searches
Total number of searches.
Definition
heapinfo.h:119
Heap_Statistics::used_blocks
uint32_t used_blocks
Current number of used blocks.
Definition
heapinfo.h:109
Heap_Statistics::frees
uint32_t frees
Total number of successful frees.
Definition
heapinfo.h:134
Heap_Statistics::lifetime_freed
uint64_t lifetime_freed
Lifetime number of bytes freed to this heap.
Definition
heapinfo.h:73
Heap_Statistics::max_search
uint32_t max_search
Maximum number of blocks searched ever.
Definition
heapinfo.h:114
Heap_Statistics::lifetime_allocated
uint64_t lifetime_allocated
Lifetime number of bytes allocated from this heap.
Definition
heapinfo.h:66
Heap_Statistics::failed_allocs
uint32_t failed_allocs
Total number of failed allocations.
Definition
heapinfo.h:129
Heap_Statistics::min_free_size
uintptr_t min_free_size
Minimum free size ever in bytes.
Definition
heapinfo.h:94
Heap_Statistics::allocs
uint32_t allocs
Total number of successful allocations.
Definition
heapinfo.h:124
Heap_Statistics::size
uintptr_t size
Size of the allocatable area in bytes.
Definition
heapinfo.h:80
Heap_Statistics::max_free_blocks
uint32_t max_free_blocks
Maximum number of free blocks ever.
Definition
heapinfo.h:104
Heap_Statistics::free_size
uintptr_t free_size
Current free size in bytes.
Definition
heapinfo.h:87
Heap_Statistics::resizes
uint32_t resizes
Total number of successful resizes.
Definition
heapinfo.h:139
Heap_Statistics::free_blocks
uint32_t free_blocks
Current number of free blocks.
Definition
heapinfo.h:99
Generated by
1.18.0