提交 f4dacfda 编写于 作者: Y yuqing

add macro fast_mblock_to_node_ptr

上级 80fba80f
......@@ -40,6 +40,10 @@ struct fast_mblock_man
pthread_mutex_t lock; //the lock for read / write free node chain
};
#define fast_mblock_to_node_ptr(data_ptr) \
(struct fast_mblock_node *)(data_ptr - ((size_t)(char *) \
&((struct fast_mblock_node *)0)->data))
#ifdef __cplusplus
extern "C" {
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册