FXMEM_SystemMgr Struct Reference

System level memory manager. Application can implement their own system memory manager. More...

Public Attributes

void *(* Alloc )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags)
 A pointer type to an allocation function. More...
 
void *(* AllocDebug )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode allocation function. More...
 
void(* CollectAll )(struct _FXMEM_SystemMgr *pMgr)
 A pointer type to a memory-collection function. More...
 
void(* Free )(struct _FXMEM_SystemMgr *pMgr, void *pointer, int flags)
 A pointer type to a free function. More...
 
void *(* Lock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 A pointer type to a lock function. More...
 
void(* Purge )(struct _FXMEM_SystemMgr *pMgr)
 A pointer type to a purge function, which can be used to purge excessive memory without touching any used memory. More...
 
void *(* Realloc )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags)
 A pointer type to a reallocation function. More...
 
void *(* ReallocDebug )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode reallocation function. More...
 
void(* Unlock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 A pointer type to a unlock function. More...
 
void * user
 A generic typeless pointer for user data.
 

Detailed Description

System level memory manager. Application can implement their own system memory manager.

Member Data Documentation

◆ Alloc

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

A pointer type to an allocation function.

The function prototype is:
void* Alloc(FXMEM_SystemMgr* pMgr, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ AllocDebug

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

A pointer type to a debug-mode allocation function.

The function prototype is:
void* AllocDebug(FXMEM_SystemMgr* pMgr, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ CollectAll

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

A pointer type to a memory-collection function.

The function prototype is:
void CollectAll(FXMEM_SystemMgr* pMgr);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
Returns
None.

◆ Free

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

A pointer type to a free function.

The function prototype is:
void Free(FXMEM_SystemMgr* pMgr, void* pointer, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]flagsMemory allocation attributes.
Returns
None.

◆ Lock

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

A pointer type to a lock function.

The function prototype is:
void Lock(FXMEM_SystemMgr* pMgr, void* handle);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]handleA handle to a memory block.
Returns
A pointer to the locked memory block.

◆ Purge

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

A pointer type to a purge function, which can be used to purge excessive memory without touching any used memory.

The function prototype is:
void Purge(FXMEM_SystemMgr* pMgr);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
Returns
None.

◆ Realloc

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

A pointer type to a reallocation function.

The function prototype is:
void* Realloc(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ ReallocDebug

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

A pointer type to a debug-mode reallocation function.

The function prototype is:
void ReallocDebug(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ Unlock

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

A pointer type to a unlock function.

The function prototype is:
void Unlock(FXMEM_SystemMgr* pMgr, void* handle);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]handleA handle to a memory block.
Returns
A pointer to the unlocked memory block.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.