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 
55  uint64_t bac_magic0;
59  uint64_t bac_magic;
63  uint64_t bac_magic_free;
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 
94 } M0_XCA_RECORD M0_XCA_DOMAIN(be);
95 
96 
108  struct m0_be_fl bah_fl;
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  */
Allocator header.
m0_bcount_t bac_size
struct m0_be_list bah_chunks
struct m0_be_allocator_stats bah_stats
Allocator statistics.
Definition: alloc.h:114
uint64_t m0_bcount_t
Definition: types.h:77
struct m0_be_list_link bac_linkage_free
Definition: fl.h:67
uint64_t bac_magic0
Allocator chunk.
m0_bcount_t baz_size
struct m0_be_fl bah_fl
struct m0_be_list_link bac_linkage
uint64_t bac_magic
#define M0_XCA_DOMAIN(value)
Definition: xcode_attr.h:72
M0_BASSERT(sizeof(struct be_alloc_chunk) %(1UL<< M0_BE_ALLOC_SHIFT_MIN)==0)
uint32_t bac_zone M0_XCA_FENUM(m0_be_alloc_zone_type)
uint64_t bac_magic1
m0_bcount_t baz_free
uint64_t bac_magic_free
m0_be_alloc_zone_type
Definition: alloc.h:85
static struct m0_be_ut_backend be
Definition: service_ut.c:59
Allocator memory zone.