Foxit PDF SDK
FXMEM_SystemMgr结构体 参考

系统级内存管理器。应用程序可以实现自己的系统内存管理器。 更多...

Public 属性

void *(* Alloc )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags)
 指向分配函数的指针类型。 更多...
 
void *(* AllocDebug )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags, FX_LPCSTR file, int line)
 指向调试模式分配函数的指针类型。 更多...
 
void(* CollectAll )(struct _FXMEM_SystemMgr *pMgr)
 指向内存收集函数的指针类型。 更多...
 
void(* Free )(struct _FXMEM_SystemMgr *pMgr, void *pointer, int flags)
 指向释放函数的指针类型。 更多...
 
void *(* Lock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 指向锁定函数的指针类型。 更多...
 
void(* Purge )(struct _FXMEM_SystemMgr *pMgr)
 指向清理函数的指针类型,可用于清理多余的内存而不触及任何使用中的内存。 更多...
 
void *(* Realloc )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags)
 指向重分配函数的指针类型。 更多...
 
void *(* ReallocDebug )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags, FX_LPCSTR file, int line)
 指向调试模式重分配函数的指针类型。 更多...
 
void(* Unlock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 指向解锁函数的指针类型。 更多...
 
void * user
 用于用户数据的通用无类型指针。
 

详细描述

系统级内存管理器。应用程序可以实现自己的系统内存管理器。

类成员变量说明

◆ Alloc

void*(* FXMEM_SystemMgr::Alloc) (struct _FXMEM_SystemMgr *pMgr, size_t size, int flags)

指向分配函数的指针类型。

函数原型:
void* Alloc(FXMEM_SystemMgr* pMgr, size_t size, int flags);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]size要分配的字节大小。
[in]flags内存分配属性。
返回
新内存块的地址。

◆ AllocDebug

void*(* FXMEM_SystemMgr::AllocDebug) (struct _FXMEM_SystemMgr *pMgr, size_t size, int flags, FX_LPCSTR file, int line)

指向调试模式分配函数的指针类型。

函数原型:
void* AllocDebug(FXMEM_SystemMgr* pMgr, size_t size, int flags, FX_LPCSTR file, int line);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]size要分配的字节大小。
[in]flags内存分配属性。
[in]file当前源文件的名称。
[in]line当前源文件中的行号。
返回
新内存块的地址。

◆ CollectAll

void(* FXMEM_SystemMgr::CollectAll) (struct _FXMEM_SystemMgr *pMgr)

指向内存收集函数的指针类型。

函数原型:
void CollectAll(FXMEM_SystemMgr* pMgr);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
返回
无。

◆ Free

void(* FXMEM_SystemMgr::Free) (struct _FXMEM_SystemMgr *pMgr, void *pointer, int flags)

指向释放函数的指针类型。

函数原型:
void Free(FXMEM_SystemMgr* pMgr, void* pointer, int flags);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]pointer指向内存块的指针。
[in]flags内存分配属性。
返回
无。

◆ Lock

void*(* FXMEM_SystemMgr::Lock) (struct _FXMEM_SystemMgr *pMgr, void *handle)

指向锁定函数的指针类型。

函数原型:
void Lock(FXMEM_SystemMgr* pMgr, void* handle);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]handle内存块的句柄。
返回
指向锁定内存块的指针。

◆ Purge

void(* FXMEM_SystemMgr::Purge) (struct _FXMEM_SystemMgr *pMgr)

指向清理函数的指针类型,可用于清理多余的内存而不触及任何使用中的内存。

函数原型:
void Purge(FXMEM_SystemMgr* pMgr);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
返回
无。

◆ Realloc

void*(* FXMEM_SystemMgr::Realloc) (struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags)

指向重分配函数的指针类型。

函数原型:
void* Realloc(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]pointer指向内存块的指针。
[in]size要重新分配的字节大小。
[in]flags内存分配属性。
返回
新内存块的地址。

◆ ReallocDebug

void*(* FXMEM_SystemMgr::ReallocDebug) (struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags, FX_LPCSTR file, int line)

指向调试模式重分配函数的指针类型。

函数原型:
void ReallocDebug(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags, FX_LPCSTR file, int line);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]pointer指向内存块的指针。
[in]size要重新分配的字节大小。
[in]flags内存分配属性。
[in]file当前源文件的名称。
[in]line当前源文件中的行号。
返回
新内存块的地址。

◆ Unlock

void(* FXMEM_SystemMgr::Unlock) (struct _FXMEM_SystemMgr *pMgr, void *handle)

指向解锁函数的指针类型。

函数原型:
void Unlock(FXMEM_SystemMgr* pMgr, void* handle);

参数
[in]pMgr指向FXMEM_SystemMgr对象的指针。
[in]handle内存块的句柄。
返回
指向解锁内存块的指针。