Motr
M0
alloc_internal.h
Go to the documentation of this file.
1
/* -*- C -*- */
2
/*
3
* Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
* For any questions about this software or licensing,
18
* please email opensource@seagate.com or cortx-questions@seagate.com.
19
*
20
*/
21
22
23
24
#pragma once
25
26
#ifndef __MOTR_BE_ALLOC_INTERNAL_H__
27
#define __MOTR_BE_ALLOC_INTERNAL_H__
28
29
#include "
lib/types.h
"
/* m0_bcount_t */
30
#include "
be/list.h
"
/* m0_be_list */
31
#include "be/list_xc.h"
32
#include "
be/alloc.h
"
/* m0_be_allocator_stats */
33
#include "be/alloc_xc.h"
34
#include "
be/fl.h
"
/* m0_be_fl */
35
#include "be/fl_xc.h"
36
50
struct
be_alloc_chunk
{
55
uint64_t
bac_magic0
;
57
struct
m0_be_list_link
bac_linkage
;
59
uint64_t
bac_magic
;
61
struct
m0_be_list_link
bac_linkage_free
;
63
uint64_t
bac_magic_free
;
65
m0_bcount_t
bac_size
;
67
bool
bac_free
;
69
uint32_t bac_zone
M0_XCA_FENUM
(
m0_be_alloc_zone_type
);
75
uint64_t
bac_magic1
;
80
char
bac_mem
[0];
81
} M0_XCA_RECORD
M0_XCA_DOMAIN
(
be
);
82
M0_BASSERT
(
sizeof
(
struct
be_alloc_chunk
) % (1UL <<
M0_BE_ALLOC_SHIFT_MIN
) == 0);
83
89
struct
m0_be_alloc_zone
{
91
m0_bcount_t
baz_size
;
93
m0_bcount_t
baz_free
;
94
} M0_XCA_RECORD
M0_XCA_DOMAIN
(
be
);
95
96
106
struct
m0_be_allocator_header
{
107
struct
m0_be_list
bah_chunks
;
108
struct
m0_be_fl
bah_fl
;
109
struct
m0_be_allocator_stats
bah_stats
;
110
m0_bcount_t
bah_size
;
111
void
*
bah_addr
;
112
} M0_XCA_RECORD
M0_XCA_DOMAIN
(
be
);
113
116
#endif
/* __MOTR_BE_ALLOC_INTERNAL_H__ */
117
118
119
/*
120
* Local variables:
121
* c-indentation-style: "K&R"
122
* c-basic-offset: 8
123
* tab-width: 8
124
* fill-column: 80
125
* scroll-step: 1
126
* End:
127
*/
128
/*
129
* vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
130
*/
m0_be_allocator_header
Allocator header.
Definition:
alloc_internal.h:106
types.h
be_alloc_chunk::bac_size
m0_bcount_t bac_size
Definition:
alloc_internal.h:65
M0_BE_ALLOC_SHIFT_MIN
Definition:
alloc.h:47
m0_be_list_link
Definition:
list.h:66
m0_be_allocator_header::bah_chunks
struct m0_be_list bah_chunks
Definition:
alloc_internal.h:107
m0_be_allocator_header::bah_stats
struct m0_be_allocator_stats bah_stats
Definition:
alloc_internal.h:109
m0_be_allocator_stats
Allocator statistics.
Definition:
alloc.h:114
m0_bcount_t
uint64_t m0_bcount_t
Definition:
types.h:77
be_alloc_chunk::bac_linkage_free
struct m0_be_list_link bac_linkage_free
Definition:
alloc_internal.h:61
m0_be_fl
Definition:
fl.h:67
be_alloc_chunk::bac_free
bool bac_free
Definition:
alloc_internal.h:67
m0_be_allocator_header::bah_addr
void * bah_addr
Definition:
alloc_internal.h:111
be_alloc_chunk::bac_magic0
uint64_t bac_magic0
Definition:
alloc_internal.h:55
fl.h
be_alloc_chunk
Allocator chunk.
Definition:
alloc_internal.h:50
m0_be_alloc_zone::baz_size
m0_bcount_t baz_size
Definition:
alloc_internal.h:91
m0_be_allocator_header::bah_fl
struct m0_be_fl bah_fl
Definition:
alloc_internal.h:108
be_alloc_chunk::bac_linkage
struct m0_be_list_link bac_linkage
Definition:
alloc_internal.h:57
alloc.h
be_alloc_chunk::bac_magic
uint64_t bac_magic
Definition:
alloc_internal.h:59
M0_XCA_DOMAIN
#define M0_XCA_DOMAIN(value)
Definition:
xcode_attr.h:72
M0_BASSERT
M0_BASSERT(sizeof(struct be_alloc_chunk) %(1UL<< M0_BE_ALLOC_SHIFT_MIN)==0)
be_alloc_chunk::M0_XCA_FENUM
uint32_t bac_zone M0_XCA_FENUM(m0_be_alloc_zone_type)
be_alloc_chunk::bac_magic1
uint64_t bac_magic1
Definition:
alloc_internal.h:75
m0_be_alloc_zone::baz_free
m0_bcount_t baz_free
Definition:
alloc_internal.h:93
be_alloc_chunk::bac_magic_free
uint64_t bac_magic_free
Definition:
alloc_internal.h:63
be_alloc_chunk::bac_mem
char bac_mem[0]
Definition:
alloc_internal.h:80
list.h
m0_be_allocator_header::bah_size
m0_bcount_t bah_size
Definition:
alloc_internal.h:110
m0_be_list
Definition:
list.h:76
m0_be_alloc_zone_type
m0_be_alloc_zone_type
Definition:
alloc.h:85
be
static struct m0_be_ut_backend be
Definition:
service_ut.c:59
m0_be_alloc_zone
Allocator memory zone.
Definition:
alloc_internal.h:89
be
alloc_internal.h
Generated on Thu Apr 14 2022 14:02:51 for Motr by
1.8.14