- Main Page
- Classes
- Files
- Directories

- File List
- File Members

Classes | Defines | Typedefs | Functions

# fbxalloc.h File Reference

Allocation functions definition. More...

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

Go to the source code of this file.

## Classes
class | FbxDeletionPolicyDefault< Type >
| Deletion policy for pointer template classes that uses the delete operator. More...
class | FbxDeletionPolicyDelete< Type >
| Deletion policy for pointer template classes that uses the FbxDelete() function. More...
class | FbxDeletionPolicyFree< Type >
| Deletion policy for pointer template classes that uses the FbxFree() function. More...
class | FbxDeletionPolicyObject< Type >
| Deletion policy for pointer template classes that uses the Destroy() function. More...
class | FbxAutoPtr< Type, Policy >
| FbxAutoPtr mimics the `auto_ptr` class template implementation available in the C++ Standard Library. More...
class | FbxAutoFreePtr< Type >
| Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate. More...
class | FbxAutoDeletePtr< Type >
| Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate. More...
class | FbxAutoDestroyPtr< Type >
| Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate. More...
## Defines
#define | FBXSDK_MEMORY_ALIGNMENT ((size_t)8U)
## Typedefs
typedef void *(* | FbxMallocProc )(size_t)
typedef void *(* | FbxCallocProc )(size_t, size_t)
| Function pointer signature used to replace "malloc".
typedef void *(* | FbxReallocProc )(void *, size_t)
| Function pointer signature used to replace "calloc".
typedef void(* | FbxFreeProc )(void *)
| Function pointer signature used to replace "realloc".
## Functions
FBXSDK_DLL void | FbxSetMallocHandler (FbxMallocProc pHandler)
| Function pointer signature used to replace "free".
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 FbxMallocProc | FbxGetMallocHandler ()
| Get the global memory allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxCallocProc | FbxGetCallocHandler ()
| Get the global zero'd memory allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxReallocProc | FbxGetReallocHandler ()
| Get the global memory re-allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxFreeProc | FbxGetFreeHandler ()
| Get the global memory freeing function used internally by the FBX SDK.
FBXSDK_DLL FbxMallocProc | FbxGetDefaultMallocHandler ()
| Get the default global memory allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxCallocProc | FbxGetDefaultCallocHandler ()
| Get the default global zero'd memory allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxReallocProc | FbxGetDefaultReallocHandler ()
| Get the default global memory re-allocation function used internally by the FBX SDK.
FBXSDK_DLL FbxFreeProc | FbxGetDefaultFreeHandler ()
| Get the default global memory freeing 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 void * | FbxMallocAligned (size_t pSize)
FBXSDK_DLL char * | FbxStrDup (const char *pString)
FBXSDK_DLL wchar_t * | FbxStrDupWC (const wchar_t *pString)
FBXSDK_DLL void * | FbxMallocDebug (size_t pSize, int pBlock, const char *pFile, int pLine)
FBXSDK_DLL void * | FbxCallocDebug (size_t pCount, size_t pSize, int pBlock, const char *pFile, int pLine)
FBXSDK_DLL void * | FbxReallocDebug (void *pData, size_t pSize, int pBlock, const char *pFile, int pLine)
FBXSDK_DLL void | FbxFreeDebug (void *pData, int pBlock)

## 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.

## Define Documentation

#define FBXSDK_MEMORY_ALIGNMENT ((size_t)8U)

Search for all occurrences

Definition at line 39 of file fbxalloc.h.

## Typedef Documentation

typedef void*(* FbxMallocProc)(size_t)

Search for all occurrences

Definition at line 41 of file fbxalloc.h.

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

Search for all occurrences

Function pointer signature used to replace "malloc".

Definition at line 42 of file fbxalloc.h.

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

Search for all occurrences

Function pointer signature used to replace "calloc".

Definition at line 43 of file fbxalloc.h.

typedef void(* FbxFreeProc)(void *)

Search for all occurrences

Function pointer signature used to replace "realloc".

Definition at line 44 of file fbxalloc.h.

## Function Documentation

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

Search for all occurrences

Function pointer signature used to replace "free".

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.

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.

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.

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.

FBXSDK_DLL FbxMallocProc FbxGetMallocHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal malloc

FBXSDK_DLL FbxCallocProc FbxGetCallocHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal calloc

FBXSDK_DLL FbxReallocProc FbxGetReallocHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal realloc

FBXSDK_DLL FbxFreeProc FbxGetFreeHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal free

FBXSDK_DLL FbxMallocProc FbxGetDefaultMallocHandler | ( |  | ) |

Search for all occurrences

Get the default global memory allocation function used internally by the FBX SDK.

Returns:
  pHandler Function pointer on FBX's internal malloc

FBXSDK_DLL FbxCallocProc FbxGetDefaultCallocHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal calloc

FBXSDK_DLL FbxReallocProc FbxGetDefaultReallocHandler | ( |  | ) |

Search for all occurrences

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

Returns:
  pHandler Function pointer on FBX's internal realloc

FBXSDK_DLL FbxFreeProc FbxGetDefaultFreeHandler | ( |  | ) |

Search for all occurrences

Get the default global memory freeing function used internally by the FBX SDK.

Returns:
  pHandler Function pointer on FBX's internal free

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 void* FbxMallocAligned | ( | size_t | pSize | ) |

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

FBXSDK_DLL void* FbxMallocDebug | ( | size_t | pSize,
|  | int | pBlock,
|  | const char * | pFile,
|  | int | pLine
| ) |  |

Search for all occurrences

FBXSDK_DLL void* FbxCallocDebug | ( | size_t | pCount,
|  | size_t | pSize,
|  | int | pBlock,
|  | const char * | pFile,
|  | int | pLine
| ) |  |

Search for all occurrences

FBXSDK_DLL void* FbxReallocDebug | ( | void * | pData,
|  | size_t | pSize,
|  | int | pBlock,
|  | const char * | pFile,
|  | int | pLine
| ) |  |

Search for all occurrences

FBXSDK_DLL void FbxFreeDebug | ( | void * | pData,
|  | int | pBlock
| ) |  |

Search for all occurrences