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
36struct xwmm_sma {
37 struct xwmm_zone zone;
38 const char * name;
40};
41
57xwer_t xwmm_sma_init(struct xwmm_sma * sa,
59 const char * name);
60
76xwer_t xwmm_sma_alloc(struct xwmm_sma * sa, xwsz_t size, xwsz_t aligned,
77 void ** membuf);
78
91xwer_t xwmm_sma_free(struct xwmm_sma * sa, void * mem);
92
97#endif /* xwos/mm/sma.h */
xwer_t xwmm_sma_alloc(struct xwmm_sma *sa, xwsz_t size, xwsz_t aligned, void **membuf)
XWMM API:从简单内存分配器中申请内存
Definition sma.c:41
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
xwer_t xwmm_sma_free(struct xwmm_sma *sa, void *mem)
XWMM API:释放内存
Definition sma.c:89
signed long xwer_t
Definition type.h:554
__xwcc_atomic xwsq_t atomic_xwsq_t
Definition type.h:448
unsigned long xwsz_t
Definition type.h:339
unsigned long xwsq_t
Definition type.h:445
unsigned long xwptr_t
Definition type.h:375
简单内存分配器
Definition sma.h:36
const char * name
Definition sma.h:38
struct xwmm_zone zone
Definition sma.h:37
atomic_xwsq_t pos
Definition sma.h:39
XWOS内存区域
Definition common.h:40
xwptr_t origin
Definition common.h:41
xwsz_t size
Definition common.h:42
XWOS内存管理:通用定义
XWOS的标准头文件