- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Typedefs | Functions

# fbxalloc.h File Reference

Allocation functions definition. More...

`#include <fbxsdk/fbxsdk_def.h>`
`#include <malloc.h>`
`#include <fbxsdk/fbxsdk_nsbegin.h>`
`#include <fbxsdk/fbxsdk_nsend.h>`

Go to the source code of this file.

## Typedefs
typedef void *(* | FbxMallocProc )(size_t)
typedef void *(* | FbxCallocProc )(size_t, size_t)
| Function pointer signature used to replace "malloc" in release mode.
typedef void *(* | FbxReallocProc )(void *, size_t)
| Function pointer signature used to replace "calloc" in release mode.
typedef void(* | FbxFreeProc )(void *)
| Function pointer signature used to replace "realloc" in release mode.
typedef size_t(* | FbxMSizeProc )(void *)
| Function pointer signature used to replace "free" in release mode.
## Functions
FBXSDK_DLL void | FbxSetMallocHandler (FbxMallocProc pHandler)
| Function pointer signature used to replace "_msize" in release mode.
FBXSDK_DLL void | FbxSetCallocHandler (FbxCallocProc pHandler)
| Set the global zero'd memory allocation function used internally by the FBX SDK.
FBXSDK_DLL void | FbxSetReallocHandler (FbxReallocProc pHandler)
| Set the global memory re-allocation function used internally by the FBX SDK.
FBXSDK_DLL void | FbxSetFreeHandler (FbxFreeProc pHandler)
| Set the global memory freeing function used internally by the FBX SDK.
FBXSDK_DLL void | FbxSetMSizeHandler (FbxMSizeProc pHandler)
| Set the global memory size retrieval function used internally by the FBX SDK.
FBXSDK_DLL void * | FbxMalloc (size_t pSize)
FBXSDK_DLL void * | FbxCalloc (size_t pCount, size_t pSize)
FBXSDK_DLL void * | FbxRealloc (void *pData, size_t pSize)
FBXSDK_DLL void | FbxFree (void *pData)
FBXSDK_DLL size_t | FbxMSize (void *pData)
FBXSDK_DLL void * | FbxMallocAligned (size_t pSize)
FBXSDK_DLL void * | FbxCallocAligned (size_t pCount, size_t pSize)
FBXSDK_DLL void * | FbxReallocAligned (void *pAlignedPtr, size_t pSize)
FBXSDK_DLL void | FbxFreeAligned (void *pAlignedPtr)
FBXSDK_DLL char * | FbxStrDup (const char *pString)
FBXSDK_DLL wchar_t * | FbxStrDupWC (const wchar_t *pString)

## Detailed Description

Allocation functions definition.

It is possible to override memory allocation functions throughout the FBX SDK by providing system memory allocation functions using the handler set functions below. The Microsoft Windows implementation in debug mode allows to specify where the allocations happen by providing the standard block type, file name and line number.

Definition in file fbxalloc.h.

## Typedef Documentation

typedef void*(* FbxMallocProc)(size_t)

Search for all occurrences

Definition at line 58 of file fbxalloc.h.

typedef void*(* FbxCallocProc)(size_t, size_t)

Search for all occurrences

Function pointer signature used to replace "malloc" in release mode.

Definition at line 59 of file fbxalloc.h.

typedef void*(* FbxReallocProc)(void *, size_t)

Search for all occurrences

Function pointer signature used to replace "calloc" in release mode.

Definition at line 60 of file fbxalloc.h.

typedef void(* FbxFreeProc)(void *)

Search for all occurrences

Function pointer signature used to replace "realloc" in release mode.

Definition at line 61 of file fbxalloc.h.

typedef size_t(* FbxMSizeProc)(void *)

Search for all occurrences

Function pointer signature used to replace "free" in release mode.

Definition at line 62 of file fbxalloc.h.

## Function Documentation

FBXSDK_DLL void FbxSetMallocHandler | ( | FbxMallocProc | pHandler | ) |

Search for all occurrences

Function pointer signature used to replace "_msize" in release mode.

Set the global memory allocation function used internally by the FBX SDK.

Parameters:

  pHandler | Function pointer that implements the necessary procedure to allocate memory in the system.

Examples:
  ViewScene/main.cxx.

FBXSDK_DLL void FbxSetCallocHandler | ( | FbxCallocProc | pHandler | ) |

Search for all occurrences

Set the global zero'd memory allocation function used internally by the FBX SDK.

Parameters:

  pHandler | Function pointer that implements the necessary procedure to allocate zero'd memory in the system.

Examples:
  ViewScene/main.cxx.

FBXSDK_DLL void FbxSetReallocHandler | ( | FbxReallocProc | pHandler | ) |

Search for all occurrences

Set the global memory re-allocation function used internally by the FBX SDK.

Parameters:

  pHandler | Function pointer that implements the necessary procedure to re-allocate memory in the system.

Examples:
  ViewScene/main.cxx.

FBXSDK_DLL void FbxSetFreeHandler | ( | FbxFreeProc | pHandler | ) |

Search for all occurrences

Set the global memory freeing function used internally by the FBX SDK.

Parameters:

  pHandler | Function pointer that implements the necessary procedure to free memory in the system.

Examples:
  ViewScene/main.cxx.

FBXSDK_DLL void FbxSetMSizeHandler | ( | FbxMSizeProc | pHandler | ) |

Search for all occurrences

Set the global memory size retrieval function used internally by the FBX SDK.

Parameters:

  pHandler | Function pointer that implements the necessary procedure to retrieve memory allocation size in the system.

Examples:
  ViewScene/main.cxx.

FBXSDK_DLL void* FbxMalloc | ( | size_t | pSize | ) |

Search for all occurrences

FBXSDK_DLL void* FbxCalloc | ( | size_t | pCount,
|  | size_t | pSize
| ) |  |

Search for all occurrences

FBXSDK_DLL void* FbxRealloc | ( | void * | pData,
|  | size_t | pSize
| ) |  |

Search for all occurrences

FBXSDK_DLL void FbxFree | ( | void * | pData | ) |

Search for all occurrences

FBXSDK_DLL size_t FbxMSize | ( | void * | pData | ) |

Search for all occurrences

FBXSDK_DLL void* FbxMallocAligned | ( | size_t | pSize | ) |

Search for all occurrences

FBXSDK_DLL void* FbxCallocAligned | ( | size_t | pCount,
|  | size_t | pSize
| ) |  |

Search for all occurrences

FBXSDK_DLL void* FbxReallocAligned | ( | void * | pAlignedPtr,
|  | size_t | pSize
| ) |  |

Search for all occurrences

FBXSDK_DLL void FbxFreeAligned | ( | void * | pAlignedPtr | ) |

Search for all occurrences

FBXSDK_DLL char* FbxStrDup | ( | const char * | pString | ) |

Search for all occurrences

FBXSDK_DLL wchar_t* FbxStrDupWC | ( | const wchar_t * | pString | ) |

Search for all occurrences