kmemory.h File Reference

#include <fbxfilesdk/fbxfilesdk_def.h>
#include <string.h>
#include <stdlib.h>
#include <fbxfilesdk/fbxfilesdk_nsbegin.h>
#include <fbxfilesdk/fbxfilesdk_nsend.h>

Go to the source code of this file.

Classes

class   KMemoryUsageCounter
  Simple Memory Usage Counter. More...
class   KMemoryAllocator
  Simple Memory allocator. More...
class   KMemoryReusePool
  A pool of memory blocks of arbitrary size. More...
struct   KMemoryReusePool::KBlockHeader
class   KMemoryPool
  class KMemory pool More...

Defines

#define  KMEMORY_DEFAULTALIGNMENT   4
#define  kMalloc(pSize)   FbxSdkMalloc( pSize )
  Allocation routines Standard allocation.
#define  kRealloc(pOldMemBlock, pNewSize)   FbxSdkRealloc( pOldMemBlock, pNewSize )
#define  kFree(pAllocatedMemBlock)   FbxSdkFree(pAllocatedMemBlock)
#define  kMallocDbg(pSize, blockType, filename, linenumber)   FbxSdkMalloc_Debug( pSize, blockType, filename, linenumber )
  Allocation routines debug Standard allocation.
#define  kReallocDbg(pOldMemBlock, pNewSize, blockType, filename, linenumber)   FbxSdkRealloc_Debug( pOldMemBlock, pNewSize, blockType, filename, linenumber )
#define  kFreeDbg(pAllocatedMemBlock, blockType, filename, linenumber)   FbxSdkFree_Debug(pAllocatedMemBlock, blockType)
#define  KMEMORY_DEFAULTALIGNMENT   4

Functions

KFBX_DLL void *  kMallocAligned (kSizeT pSize, kUInt pAlignment=KMEMORY_DEFAULTALIGNMENT)
  Aligned memory allocation.
KFBX_DLL void *  kReallocAligned (void *pAlignedPtr, kSizeT pSize, kUInt pAlignment=KMEMORY_DEFAULTALIGNMENT)
  Aligned memory reallocation.
KFBX_DLL void  kFreeAligned (void *pAlignedPtr)
  Aligned memory deallocation.
KFBX_DLL void *  kMallocAlignedDbg (kSizeT pSize, kUInt pAlignment, int blockType, const char *filename, int linenumber)
KFBX_DLL void *  kReallocAlignedDbg (void *pAlignedPtr, kSizeT pSize, kUInt pAlignment, int blockType, const char *filename, int linenumber)
KFBX_DLL void  kFreeAlignedDbg (void *pAlignedPtr, int blockType, const char *filename, int linenumber)

Detailed Description

Definition in file kmemory.h.


Define Documentation

#define KMEMORY_DEFAULTALIGNMENT   4

Definition at line 160 of file kmemory.h.

#define kMalloc (   pSize )    FbxSdkMalloc( pSize )

Allocation routines Standard allocation.

Definition at line 59 of file kmemory.h.

#define kRealloc (   pOldMemBlock,
  pNewSize 
)    FbxSdkRealloc( pOldMemBlock, pNewSize )

Definition at line 60 of file kmemory.h.

#define kFree (   pAllocatedMemBlock )    FbxSdkFree(pAllocatedMemBlock)

Definition at line 61 of file kmemory.h.

#define kMallocDbg (   pSize,
  blockType,
  filename,
  linenumber 
)    FbxSdkMalloc_Debug( pSize, blockType, filename, linenumber )

Allocation routines debug Standard allocation.

Definition at line 88 of file kmemory.h.

#define kReallocDbg (   pOldMemBlock,
  pNewSize,
  blockType,
  filename,
  linenumber 
)    FbxSdkRealloc_Debug( pOldMemBlock, pNewSize, blockType, filename, linenumber )

Definition at line 89 of file kmemory.h.

#define kFreeDbg (   pAllocatedMemBlock,
  blockType,
  filename,
  linenumber 
)    FbxSdkFree_Debug(pAllocatedMemBlock, blockType)

Definition at line 90 of file kmemory.h.

#define KMEMORY_DEFAULTALIGNMENT   4

Definition at line 160 of file kmemory.h.


Function Documentation

KFBX_DLL void* kMallocAligned ( kSizeT  pSize,
kUInt  pAlignment = KMEMORY_DEFAULTALIGNMENT 
)

Aligned memory allocation.

Parameters:
pSize Memory block size.
pAlignment Alignment window or width.
Returns:
the allocated memory block. (Used to free the block).
KFBX_DLL void* kReallocAligned ( void *  pAlignedPtr,
kSizeT  pSize,
kUInt  pAlignment = KMEMORY_DEFAULTALIGNMENT 
)

Aligned memory reallocation.

Parameters:
pAlignedPtr Previously aligned block
pSize Memory block size.
pAlignment Alignment window or width.
Returns:
the reallocated memory block. (Used to free the block).
KFBX_DLL void kFreeAligned ( void *  pAlignedPtr )

Aligned memory deallocation.

Parameters:
pAlignedPtr
Returns:
KFBX_DLL void
KFBX_DLL void* kMallocAlignedDbg ( kSizeT  pSize,
kUInt  pAlignment,
int  blockType,
const char *  filename,
int  linenumber 
)
KFBX_DLL void* kReallocAlignedDbg ( void *  pAlignedPtr,
kSizeT  pSize,
kUInt  pAlignment,
int  blockType,
const char *  filename,
int  linenumber 
)
KFBX_DLL void kFreeAlignedDbg ( void *  pAlignedPtr,
int  blockType,
const char *  filename,
int  linenumber 
)