XWOS API
4.0
XWOS C/C++ API参考手册
|
XWOS内存管理:内存池:对象缓存 更多...
#include <xwos/standard.h>
#include <xwos/lib/xwbop.h>
#include <xwos/lib/bclst.h>
#include <xwos/osal/lock/seqlock.h>
#include <xwos/mm/common.h>
#include <xwos/mm/mempool/i_allocator.h>
#include <xwos/mm/mempool/page.h>
结构体 | |
struct | xwmm_mempool_objcache |
对象缓存 更多... | |
函数 | |
xwer_t | xwmm_mempool_objcache_init (struct xwmm_mempool_objcache *oc, struct xwmm_mempool_page_allocator *pa, const char *name, xwsz_t objsize, xwsz_t alignment, xwsq_t pg_order, ctor_f ctor, dtor_f dtor) |
XWMM API:初始化对象缓存 | |
xwer_t | xwmm_mempool_objcache_alloc (struct xwmm_mempool_objcache *oc, void **objbuf) |
XWMM API:从对象缓存中申请一个对象 | |
xwer_t | xwmm_mempool_objcache_free (struct xwmm_mempool_objcache *oc, void *obj) |
XWMM API:释放对象到对象缓存中 | |
xwer_t | xwmm_mempool_objcache_reserve (struct xwmm_mempool_objcache *oc, xwsz_t reserved) |
XWMM API:预留对象到对象缓存中 | |
xwer_t | xwmm_mempool_objcache_get_capacity (struct xwmm_mempool_objcache *oc, xwsz_t *capacity) |
XWMM API:获取对象缓存的容量 | |
XWOS内存管理:内存池:对象缓存
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 objcache.h 中定义.