XWOS API
4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
sma.h
浏览该文件的文档.
1
13
#ifndef __xwos_mm_sma_h__
14
#define __xwos_mm_sma_h__
15
16
#include <
xwos/standard.h
>
17
#include <
xwos/mm/common.h
>
18
36
struct
xwmm_sma
{
37
struct
xwmm_zone
zone
;
38
const
char
*
name
;
39
atomic_xwsq_t
pos
;
40
};
41
57
xwer_t
xwmm_sma_init
(
struct
xwmm_sma
* sa,
58
xwptr_t
origin
,
xwsz_t
size
,
xwsq_t
pos,
59
const
char
* name);
60
76
xwer_t
xwmm_sma_alloc
(
struct
xwmm_sma
* sa,
xwsz_t
size
,
xwsz_t
aligned,
77
void
** membuf);
78
91
xwer_t
xwmm_sma_free
(
struct
xwmm_sma
* sa,
void
* mem);
92
97
#endif
/* xwos/mm/sma.h */
xwmm_sma_alloc
xwer_t xwmm_sma_alloc(struct xwmm_sma *sa, xwsz_t size, xwsz_t aligned, void **membuf)
XWMM API:从简单内存分配器中申请内存
Definition
sma.c:41
xwmm_sma_init
xwer_t xwmm_sma_init(struct xwmm_sma *sa, xwptr_t origin, xwsz_t size, xwsq_t pos, const char *name)
XWMM API:初始化简单内存分配器对象
Definition
sma.c:20
xwmm_sma_free
xwer_t xwmm_sma_free(struct xwmm_sma *sa, void *mem)
XWMM API:释放内存
Definition
sma.c:89
xwer_t
signed long xwer_t
Definition
type.h:554
atomic_xwsq_t
__xwcc_atomic xwsq_t atomic_xwsq_t
Definition
type.h:448
xwsz_t
unsigned long xwsz_t
Definition
type.h:339
xwsq_t
unsigned long xwsq_t
Definition
type.h:445
xwptr_t
unsigned long xwptr_t
Definition
type.h:375
xwmm_sma
简单内存分配器
Definition
sma.h:36
xwmm_sma::name
const char * name
Definition
sma.h:38
xwmm_sma::zone
struct xwmm_zone zone
Definition
sma.h:37
xwmm_sma::pos
atomic_xwsq_t pos
Definition
sma.h:39
xwmm_zone
XWOS内存区域
Definition
common.h:40
xwmm_zone::origin
xwptr_t origin
Definition
common.h:41
xwmm_zone::size
xwsz_t size
Definition
common.h:42
common.h
XWOS内存管理:通用定义
standard.h
XWOS的标准头文件
xwos
mm
sma.h
制作者
1.9.7