Motr  M0
alloc_internal.h File Reference
#include "lib/types.h"
#include "be/list.h"
#include "be/list_xc.h"
#include "be/alloc.h"
#include "be/alloc_xc.h"
#include "be/fl.h"
#include "be/fl_xc.h"
Include dependency graph for alloc_internal.h:

Go to the source code of this file.

Data Structures

struct  be_alloc_chunk
 Allocator chunk. More...
 
struct  m0_be_alloc_zone
 Allocator memory zone. More...
 
struct  m0_be_allocator_header
 Allocator header. More...
 

Macros

#define __MOTR_BE_ALLOC_INTERNAL_H__
 

Functions

struct m0_be_allocator_call_stat M0_XCA_DOMAIN (be)
 
uint32_t bac_zone M0_XCA_FENUM (m0_be_alloc_zone_type)
 
 M0_BASSERT (sizeof(struct be_alloc_chunk) %(1UL<< M0_BE_ALLOC_SHIFT_MIN)==0)
 

Variables

uint64_t bac_magic0
 
struct m0_be_list_link bac_linkage
 
uint64_t bac_magic
 
struct m0_be_list_link bac_linkage_free
 
uint64_t bac_magic_free
 
m0_bcount_t bac_size
 
bool bac_free
 
uint64_t bac_magic1
 
char bac_mem [0]
 
m0_bcount_t baz_size
 
m0_bcount_t baz_free
 
struct m0_be_list bah_chunks
 
struct m0_be_fl bah_fl
 
struct m0_be_allocator_stats bah_stats
 
m0_bcount_t bah_size
 
void * bah_addr
 

Macro Definition Documentation

◆ __MOTR_BE_ALLOC_INTERNAL_H__

#define __MOTR_BE_ALLOC_INTERNAL_H__

Definition at line 27 of file alloc_internal.h.

Function Documentation

◆ M0_XCA_FENUM()

uint32_t bac_zone M0_XCA_DOMAIN::M0_XCA_FENUM ( m0_be_alloc_zone_type  )

Allocator zone where chunk resides.

Variable Documentation

◆ bac_free

bool bac_free

is chunk free?

Definition at line 162 of file alloc_internal.h.

◆ bac_linkage

struct m0_be_list_link bac_linkage

for m0_be_allocator_header.bah_chunks list

Definition at line 152 of file alloc_internal.h.

◆ bac_linkage_free

struct m0_be_list_link bac_linkage_free

for m0_be_allocator_header.bah_fl list

Definition at line 156 of file alloc_internal.h.

◆ bac_magic

uint64_t bac_magic

magic for bac_linkage

Definition at line 154 of file alloc_internal.h.

◆ bac_magic0

uint64_t bac_magic0

M0_BE_ALLOC_MAGIC0 Used to find invalid memory access after allocated chunk.

Definition at line 150 of file alloc_internal.h.

◆ bac_magic1

uint64_t bac_magic1

M0_BE_ALLOC_MAGIC1 Used to find invalid memory access before allocated chunk.M0_BE_ALLOC_MAGIC1

Definition at line 170 of file alloc_internal.h.

◆ bac_magic_free

uint64_t bac_magic_free

magic for bac_linkage_free

Definition at line 158 of file alloc_internal.h.

◆ bac_mem

char bac_mem[0]

m0_be_alloc() and m0_be_alloc_aligned() will return address of bac_mem for allocated chunk.

Definition at line 175 of file alloc_internal.h.

◆ bac_size

m0_bcount_t bac_size

size of chunk

Definition at line 160 of file alloc_internal.h.

◆ bah_addr

void* bah_addr

memory address

Definition at line 87 of file alloc_internal.h.

◆ bah_chunks

struct m0_be_list bah_chunks

all chunks

Definition at line 83 of file alloc_internal.h.

◆ bah_fl

struct m0_be_fl bah_fl

free lists

Definition at line 84 of file alloc_internal.h.

◆ bah_size

m0_bcount_t bah_size

memory size

Definition at line 86 of file alloc_internal.h.

◆ bah_stats

struct m0_be_allocator_stats bah_stats

XXX not used now

Definition at line 85 of file alloc_internal.h.

◆ baz_free

m0_bcount_t baz_free

Number of free bytes in zone.

Definition at line 86 of file alloc_internal.h.

◆ baz_size

m0_bcount_t baz_size

Zone size in bytes.

Definition at line 84 of file alloc_internal.h.