64 if ((
xwsz_t)0 == aligned) {
79 *membuf = (
void *)tmp;
#define XWMM_UNALIGNED_MASK
xwer_t xwmm_sma_alloc(struct xwmm_sma *sa, xwsz_t size, xwsz_t aligned, void **membuf)
XWMM API:从简单内存分配器中申请内存
xwer_t xwmm_sma_init(struct xwmm_sma *sa, xwptr_t origin, xwsz_t size, xwsq_t pos, const char *name)
XWMM API:初始化简单内存分配器对象
xwer_t xwmm_sma_free(struct xwmm_sma *sa, void *mem)
XWMM API:释放内存
#define EINVAL
Invalid argument
#define EFAULT
Bad address
#define ENOMEM
Not enough space
#define xwaop_teq_then_write(type, a, t, v, ov)
对原子变量进行原子操作:读取-测试“相等”-写
#define xwaop_load(type, a, memorder)
对原子变量进行原子操作:加载
#define XWBOP_ALIGN(x, n)
#define XWOS_VALIDATE(exp, errstr,...)
检查函数参数是否有效