RTEMS 6.1-rc4
Loading...
Searching...
No Matches
heapinfo.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
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
44extern "C" {
45#endif
46
60typedef struct {
67
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
105
109 uint32_t used_blocks;
110
114 uint32_t max_search;
115
119 uint32_t searches;
120
124 uint32_t allocs;
125
130
134 uint32_t frees;
135
139 uint32_t resizes;
141
145typedef struct {
149 uintptr_t number;
150
154 uintptr_t largest;
155
159 uintptr_t total;
161
165typedef struct {
166 Heap_Information Free;
167 Heap_Information Used;
168 Heap_Statistics Stats;
170
173#ifdef __cplusplus
174}
175#endif
176
177#endif
178/* end of include file */
Information block returned by _Heap_Get_information().
Definition: heapinfo.h:165
Information about blocks.
Definition: heapinfo.h:145
uintptr_t total
Total size of the blocks of this type.
Definition: heapinfo.h:159
uintptr_t largest
Largest block of this type.
Definition: heapinfo.h:154
uintptr_t number
Number of blocks of this type.
Definition: heapinfo.h:149
Run-time heap statistics.
Definition: heapinfo.h:60
uint32_t searches
Total number of searches.
Definition: heapinfo.h:119
uint32_t used_blocks
Current number of used blocks.
Definition: heapinfo.h:109
uint32_t frees
Total number of successful frees.
Definition: heapinfo.h:134
uint64_t lifetime_freed
Lifetime number of bytes freed to this heap.
Definition: heapinfo.h:73
uint32_t max_search
Maximum number of blocks searched ever.
Definition: heapinfo.h:114
uint64_t lifetime_allocated
Lifetime number of bytes allocated from this heap.
Definition: heapinfo.h:66
uint32_t failed_allocs
Total number of failed allocations.
Definition: heapinfo.h:129
uintptr_t min_free_size
Minimum free size ever in bytes.
Definition: heapinfo.h:94
uint32_t allocs
Total number of successful allocations.
Definition: heapinfo.h:124
uintptr_t size
Size of the allocatable area in bytes.
Definition: heapinfo.h:80
uint32_t max_free_blocks
Maximum number of free blocks ever.
Definition: heapinfo.h:104
uintptr_t free_size
Current free size in bytes.
Definition: heapinfo.h:87
uint32_t resizes
Total number of successful resizes.
Definition: heapinfo.h:139
uint32_t free_blocks
Current number of free blocks.
Definition: heapinfo.h:99