Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OSCL Memory

## Files
file | oscl_mem.h
| This file contains basic memory definitions for common use across platforms.

file | oscl_mem_audit.h
| This file contains the definition and partial implementation of MM_Audit class.

file | oscl_mem_audit_internals.h
| This file contains the internal definitions for the mem audit library.

file | oscl_mem_auto_ptr.h
| This file defines the oscl_mem_auto_ptr template class. This class is used to avoid any potential memory leaks that may arise while returning from methods in case of error.

file | oscl_mem_basic_functions.h
| This file contains prototypes for the basic memory functions.

file | oscl_mem_mempool.h
| This file contains the definition of memory pool allocators.

## Data Structures
class | allocator
class | allocator
class | HeapBase
struct | MM_AllocBlockFence
struct | MM_AllocBlockHdr
struct | MM_AllocInfo
struct | MM_AllocNode
struct | MM_AllocQueryInfo
class | MM_Audit_Imp
struct | MM_AuditOverheadStats
struct | MM_FailInsertParam
struct | MM_Stats_CB
struct | MM_Stats_t
class | OsclAuditCB
class | OsclMem
class | OsclMemAllocator
class | OsclMemAllocator
class | OsclMemAllocDestructDealloc
class | OsclMemAllocDestructDealloc
class | OsclMemAudit
class | OSCLMemAutoPtr
| The oscl_auto_ptr class is a template class that defines a pointer like object intended to be assigned an address obtanined (directly or or indirectly) by new. When the oscl_auto_ptr expires, its destructor uses delete to free the memory. More...
class | OsclMemBasicAllocator
class | OsclMemBasicAllocator
class | OsclMemBasicAllocDestructDealloc
class | OsclMemBasicAllocDestructDealloc
class | OsclMemGlobalAuditObject
class | OsclMemPoolFixedChunkAllocator
class | OsclMemPoolFixedChunkAllocatorObserver
class | OsclMemPoolResizableAllocator
class | OsclMemPoolResizableAllocatorMemoryObserver
class | OsclMemPoolResizableAllocatorObserver
class | OsclMemStatsNode
## Defines
#define | OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE
#define | OSCL_HAS_GLOBAL_NEW_DELETE 1
#define | OSCL_CLEANUP_BASE_CLASS(T) _OSCL_CLEANUP_BASE_CLASS(T)
#define | OSCL_ALLOC_NEW(T_allocator, T, params) new(T_allocator.allocate(1)) T params
#define | OSCL_TRAP_ALLOC_NEW(T_ptr, T_allocator, T, params) _OSCL_TRAP_NEW(T_allocator.allocate(1),T_allocator.deallocate,T_ptr,T,params)
#define | OSCL_ALLOC_DELETE(ptr, T_allocator, T)
#define | OSCL_MALLOC(count) _oscl_default_audit_malloc(count)
#define | oscl_malloc(a) OSCL_MALLOC(a)
#define | OSCL_DEFAULT_MALLOC(x) OSCL_MALLOC(x)
#define | OSCL_AUDIT_MALLOC(auditCB, count) _oscl_audit_malloc(count, auditCB)
#define | OSCL_CALLOC(num, size) _oscl_default_audit_calloc(num,size)
#define | oscl_calloc(a, b) OSCL_CALLOC(a,b)
#define | OSCL_AUDIT_CALLOC(auditCB, num, size) _oscl_audit_calloc(num,size, auditCB)
#define | OSCL_REALLOC(ptr, new_size) _oscl_default_audit_realloc(ptr,new_size)
#define | oscl_realloc(a, b) OSCL_REALLOC(a,b)
#define | OSCL_AUDIT_REALLOC(auditCB, ptr, new_size) _oscl_audit_realloc(ptr,new_size, auditCB)
#define | OSCL_FREE(ptr) _oscl_audit_free(ptr)
#define | oscl_free(x) OSCL_FREE(x)
#define | OSCL_DEFAULT_FREE(x) OSCL_FREE(x)
#define | OSCL_NEW(T, params) new T params
#define | OSCL_PLACEMENT_NEW(ptr, constructor) new(ptr) constructor
#define | OSCL_TRAP_NEW(T_ptr, T, params) _OSCL_TRAP_NEW(_oscl_default_audit_new(sizeof(T)),_oscl_audit_free,T_ptr,T,params)
#define | OSCL_AUDIT_NEW(auditCB, T, params) new(_oscl_audit_new(sizeof(T),auditCB)) T params
#define | OSCL_TRAP_AUDIT_NEW(T_ptr, auditCB, T, params) _OSCL_TRAP_NEW(_oscl_audit_new(sizeof(T),auditCB),_oscl_audit_free,T_ptr,T,params)
#define | OSCL_DELETE(ptr)
#define | OSCL_AUDIT_ARRAY_NEW(auditCB, T, count) new(_oscl_audit_new(sizeof(T)*(count),auditCB)) T
#define | OSCL_ARRAY_NEW(T, count) new T[count]
#define | OSCL_ARRAY_DELETE(ptr) delete [] ptr
#define | _OSCL_TRAP_NEW(exp, freeFunc, T_ptr, T, params)
#define | _OSCL_CLEANUP_BASE_CLASS(T) this->T::~T()
#define | MM_ALLOC_MAX_QUERY_FILENAME_LEN 128
#define | MM_ALLOC_MAX_QUERY_TAG_LEN 64
#define | MM_AUDIT_VALIDATE_BLOCK 1
#define | MM_AUDIT_PREFILL_FLAG 0x1
#define | MM_AUDIT_POSTFILL_FLAG 0x2
#define | MM_AUDIT_VALIDATE_ALL_HEAP_FLAG 0x4
#define | MM_AUDIT_VALIDATE_ON_FREE_FLAG 0x8
#define | MM_AUDIT_ALLOC_NODE_ENABLE_FLAG 0x10
#define | MM_AUDIT_SUPPRESS_FILENAME_FLAG 0x20
#define | DEFAULT_MM_AUDIT_MODE 0
#define | MM_AUDIT_ALLOC_NODE_SUPPORT 1
#define | MM_AUDIT_FENCE_SUPPORT 0
#define | MM_AUDIT_INCLUDE_ALL_HEAP_VALIDATION 1
#define | MM_AUDIT_FILL_SUPPORT 0
#define | MM_AUDIT_FAILURE_SIMULATION_SUPPORT 1
#define | FENCE_PATTERN 0xAA
#define | MIN_FENCE_SIZE 4
#define | MEM_ALIGN_SIZE 8
#define | COMPUTE_MEM_ALIGN_SIZE(x, y, z) (y+(((x+y)%z) ? (z - (x+y)%z) : 0))
#define | DEFAULT_PREFILL_PATTERN 0x96
#define | DEFAULT_POSTFILL_PATTERN 0x5A
#define | OSCL_DISABLE_WARNING_RETURN_TYPE_NOT_UDT
## Typedefs
typedef OSCLMemAutoPtr< char, Oscl_TAlloc< char, OsclMemBasicAllocator > > | MMAuditCharAutoPtr
typedef OSCLMemAutoPtr< uint8, Oscl_TAlloc< uint8, _OsclBasicAllocator > > | MMAuditUint8AutoPtr
typedef OSCLMemAutoPtr< MM_AllocNode, Oscl_TAlloc< MM_AllocNode, OsclMemBasicAllocator > > | MM_AllocNodeAutoPtr
typedef OSCLMemAutoPtr< OsclMemStatsNode, Oscl_TAlloc< OsclMemStatsNode, OsclMemBasicAllocator > > | MM_StatsNodeTagTreeType
typedef OSCLMemAutoPtr< OsclMemStatsNode, Oscl_TAlloc< OsclMemStatsNode, OsclMemBasicAllocator > > | OsclMemStatsNodeAutoPtr
typedef Oscl_TAlloc< MM_StatsNodeTagTreeType, OsclMemBasicAllocator > | TagTree_Allocator
typedef Oscl_TagTree< MM_StatsNodeTagTreeType, TagTree_Allocator > | OsclTagTreeType
## Functions
OSCL_COND_IMPORT_REF void * | _oscl_malloc (int32 count)
OSCL_COND_IMPORT_REF void * | _oscl_calloc (int32 nelems, int32 size)
OSCL_COND_IMPORT_REF void * | _oscl_realloc (void *src, int32 count)
OSCL_COND_IMPORT_REF void | _oscl_free (void *src)
OSCL_COND_IMPORT_REF void * | oscl_memcpy (void *dest, const void *src, uint32 count)
OSCL_COND_IMPORT_REF void * | oscl_memmove (void *dest, const void *src, uint32 count)
OSCL_COND_IMPORT_REF void * | oscl_memmove32 (void *dest, const void *src, uint32 count)
OSCL_COND_IMPORT_REF void * | oscl_memset (void *dest, uint8 val, uint32 count)
OSCL_COND_IMPORT_REF int | oscl_memcmp (const void *buf1, const void *buf2, uint32 count)
OSCL_COND_IMPORT_REF uint | oscl_mem_aligned_size (uint size)
OSCL_IMPORT_REF void | OsclMemInit (OsclAuditCB &auditCB)
OSCL_IMPORT_REF void * | _oscl_audit_malloc (size_t, OsclAuditCB &, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_audit_calloc (size_t, size_t, OsclAuditCB &, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_audit_realloc (void *, size_t, OsclAuditCB &, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_audit_new (size_t, OsclAuditCB &, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_default_audit_malloc (size_t, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_default_audit_calloc (size_t, size_t, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_default_audit_realloc (void *, size_t, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void * | _oscl_default_audit_new (size_t, const char *f=NULL, const int l=0)
OSCL_IMPORT_REF void | _oscl_audit_free (void *)
void * | operator new (size_t aSize, const char *aFile, int aLine)
void * | operator new (size_t)
void | operator delete (void *)
void * | operator new[] (size_t aSize, const char *aFile, int aLine)
void * | operator new[] (size_t aSize)
void | operator delete[] (void *aPtr)
## Variables
const uint32 | ALLOC_NODE_FLAG = 0x80000000

## Define Documentation

#define _OSCL_CLEANUP_BASE_CLASS | ( | T |  | ) | this->T::~T()

  | This macro is used to cleanup the base class in a derived-class constructor just before a leave occurs. Parameters:
  T: | base class name.

#define _OSCL_TRAP_NEW | ( | exp,
|  | freeFunc,
|  | T_ptr,
|  | T,
|  | params |  | ) |

| Value:
    {\
        int32 __err;\
        OsclAny*__ptr=exp;\
        OSCL_TRY(__err,T_ptr=new(__ptr) T params;);\
        if(__err){\
            freeFunc(__ptr);\
            T_ptr=NULL;\
            OsclError::Leave(__err);\
        }\
    }
  Internal-use macro to catch leaves in constructors. If the constructor leaves, this will free the memory before allowing the leave to propagate to the next level. It is the constructor's responsibility to cleanup any memory in the partially constructed object before leaving. This cleanup may include cleaning up the base class using the OSCL_CLEANUP_BASE_CLASS macro. Parameters:
  exp: | expression to allocate memory.
  Tptr:variable | to hold result.
  T: | type
  params: | constructor arg list
  freeFunc: | delete or free function.

#define COMPUTE_MEM_ALIGN_SIZE | ( | x,
|  | y,
|  | z |  | ) | (y+(((x+y)%z) ? (z - (x+y)%z) : 0))

#define DEFAULT_MM_AUDIT_MODE 0

#define DEFAULT_POSTFILL_PATTERN 0x5A

#define DEFAULT_PREFILL_PATTERN 0x96

#define FENCE_PATTERN 0xAA

#define MEM_ALIGN_SIZE 8

#define MIN_FENCE_SIZE 4

#define MM_ALLOC_MAX_QUERY_FILENAME_LEN 128

#define MM_ALLOC_MAX_QUERY_TAG_LEN 64

#define MM_AUDIT_ALLOC_NODE_ENABLE_FLAG 0x10

#define MM_AUDIT_ALLOC_NODE_SUPPORT 1

#define MM_AUDIT_FAILURE_SIMULATION_SUPPORT 1

#define MM_AUDIT_FENCE_SUPPORT 0

#define MM_AUDIT_FILL_SUPPORT 0

#define MM_AUDIT_INCLUDE_ALL_HEAP_VALIDATION 1

#define MM_AUDIT_POSTFILL_FLAG 0x2

#define MM_AUDIT_PREFILL_FLAG 0x1

#define MM_AUDIT_SUPPRESS_FILENAME_FLAG 0x20

#define MM_AUDIT_VALIDATE_ALL_HEAP_FLAG 0x4

#define MM_AUDIT_VALIDATE_BLOCK 1

#define MM_AUDIT_VALIDATE_ON_FREE_FLAG 0x8

#define OSCL_ALLOC_DELETE | ( | ptr,
|  | T_allocator,
|  | T |  | ) |

| Value:
    {\
      ptr->~T();\
      T_allocator.deallocate(ptr);\
      }
  Deletes the object of type T using the given allocator Parameters:
  T_allocator | allocator for objects of type T
  T | type of object to delete
  ptr | pointer to previously created object
  Exceptions:
  none | , unless thrown by the given allocator

#define OSCL_ALLOC_NEW | ( | T_allocator,
|  | T,
|  | params |  | ) | new(T_allocator.allocate(1)) T params

  | Creates an object of type T using the given allocator to acquire the memory needed. Parameters:
  T_allocator | allocator for objects of type T, must be an Oscl_TAlloc<T, Allocator>, where Allocator is an Oscl_DefAlloc
  T | type of object to create
  params | object initialization parameters
  Returns: pointer to created object Exceptions:
  none | , unless thrown by the given allocator

#define OSCL_ARRAY_DELETE | ( | ptr |  | ) | delete [] ptr

  | Oscl array delete operator.. Parameters:
  ptr | pointer to memory block previously allocated with OSCL_ARRAY_NEW
Returns: void

#define OSCL_ARRAY_NEW | ( | T,
|  | count |  | ) | new T[count]

  | Oscl array "new" operator. This uses the global memory audit object. Parameters:
  T | data type for 'new' operation
  count | number of elements to create
  Returns: pointer to the newly created object array of type T Exceptions:
  may | leave with code = bad alloc

#define OSCL_AUDIT_ARRAY_NEW | ( | auditCB,
|  | T,
|  | count |  | ) | new(_oscl_audit_new(sizeof(T)*(count),auditCB)) T

  | Oscl array "new" operator. This uses the input memory audit object. Parameters:
  auditCB | input memory management audit object
  T | data type for 'new' operation
  count | number of elements to create
  Returns: pointer to the newly created object array of type T Exceptions:
  may | leave with code = bad alloc

#define OSCL_AUDIT_CALLOC | ( | auditCB,
|  | num,
|  | size |  | ) | _oscl_audit_calloc(num,size, auditCB)

  | Allocates a memory block using the specified audit object. The block is initialized to zero. Parameters:
  auditCB | input memory management audit object
  num | number of elements
  size | number of bytes to allocate for each element
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define OSCL_AUDIT_MALLOC | ( | auditCB,
|  | count |  | ) | _oscl_audit_malloc(count, auditCB)

  | Allocates a memory block using the given audit object. Parameters:
  auditCB | input memory management audit object
  count | number of bytes to allocate
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define OSCL_AUDIT_NEW | ( | auditCB,
|  | T,
|  | params |  | ) | new(_oscl_audit_new(sizeof(T),auditCB)) T params

  | Oscl "new" operator. This uses the specified memory audit object. Parameters:
  auditCB | input memory management audit object
  T | data type for 'new' operation
  params | object initialization parameters
  Returns: pointer to the newly created object of type T Exceptions:
  may | leave with code = bad alloc

#define OSCL_AUDIT_REALLOC | ( | auditCB,
|  | ptr,
|  | new_size |  | ) | _oscl_audit_realloc(ptr,new_size, auditCB)

  | Re-Allocates a memory block using the specified audit object. Parameters:
  auditCB | input memory management audit object
  ptr | original memory block
  new_size | New size of the block
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define oscl_calloc | ( | a,
|  | b |  | ) | OSCL_CALLOC(a,b)

#define OSCL_CALLOC | ( | num,
|  | size |  | ) | _oscl_default_audit_calloc(num,size)

  | Allocates a memory block using the memory management's global audit object. The block is initialized to zero. Parameters:
  num | number of elements
  size | number of bytes to allocate for each element
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define OSCL_CLEANUP_BASE_CLASS | ( | T |  | ) | _OSCL_CLEANUP_BASE_CLASS(T)

  | Cleans up the base class of a partially-constructed derived class. This macro will call the destructor if necessary, based on the error-handling implementation. Parameters:
  T: | name of the base class.

#define OSCL_DEFAULT_FREE | ( | x |  | ) | OSCL_FREE(x)

| Another back-compatibility definition.

#define OSCL_DEFAULT_MALLOC | ( | x |  | ) | OSCL_MALLOC(x)

| Another back-compatibility definition.

#define OSCL_DELETE | ( | ptr |  | ) |

| Value:
    {\
        if(ptr){delete(ptr);}\
    }
  Oscl "delete" operator. Parameters:
  ptr | pointer to memory block previously allocated with OSCL_NEW
Returns: void

#define OSCL_DISABLE_WARNING_RETURN_TYPE_NOT_UDT

#define OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE

| Previously this was in oscl_mem_imp.h

#define oscl_free | ( | x |  | ) | OSCL_FREE(x)

#define OSCL_FREE | ( | ptr |  | ) | _oscl_audit_free(ptr)

  | Deallocates or frees a memory block. Parameters:
  ptr | pointer to previously allocated memory block using the given audit object

#define OSCL_HAS_GLOBAL_NEW_DELETE 1

#define oscl_malloc | ( | a |  | ) | OSCL_MALLOC(a)

#define OSCL_MALLOC | ( | count |  | ) | _oscl_default_audit_malloc(count)

  | Allocates a memory block using the memory management's global audit object. Parameters:
  count | number of bytes to allocate
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define OSCL_NEW | ( | T,
|  | params |  | ) | new T params

  | Oscl "new" operator. This uses the global memory audit object. Parameters:
  T | data type for 'new' operation
  params | object initialization parameters
  Returns: pointer to the newly created object of type T Exceptions:
  may | leave with code = bad alloc

#define OSCL_PLACEMENT_NEW | ( | ptr,
|  | constructor |  | ) | new(ptr) constructor

#define oscl_realloc | ( | a,
|  | b |  | ) | OSCL_REALLOC(a,b)

#define OSCL_REALLOC | ( | ptr,
|  | new_size |  | ) | _oscl_default_audit_realloc(ptr,new_size)

  | Re-Allocates a memory block using the memory management's global audit object. Parameters:
  ptr | original memory block
  new_size | New size of the block
  Returns: a void pointer to the allocated space, or NULL if there is insufficient memory available. Exceptions:
  none |

#define OSCL_TRAP_ALLOC_NEW | ( | T_ptr,
|  | T_allocator,
|  | T,
|  | params |  | ) | _OSCL_TRAP_NEW(T_allocator.allocate(1),T_allocator.deallocate,T_ptr,T,params)

  | Creates an object of type T using the given allocator to acquire the memory needed. This macro is similar to OSCL_ALLOC_NEW except that it handles constructors that leave. If the constructor leaves, the destructor will be called, and allocated memory will be freed before allowing the leave to propagate to the next level. Parameters:
  T_ptr | variable to hold return value-- pointer to new object of type T.
  T_allocator | allocator for objects of type T, must be an Oscl_TAlloc<T, Allocator>, where Allocator is an Oscl_DefAlloc
  T | type of object to create
  params | object initialization parameters
  Returns: pointer to created object Exceptions:
  none | , unless thrown by the given allocator

#define OSCL_TRAP_AUDIT_NEW | ( | T_ptr,
|  | auditCB,
|  | T,
|  | params |  | ) | _OSCL_TRAP_NEW(_oscl_audit_new(sizeof(T),auditCB),_oscl_audit_free,T_ptr,T,params)

  | Oscl "new" operator. This uses the specified memory audit object. This macro is similar to OSCL_AUDIT_NEW except that it will handle constructors that leave. If the constructor leaves, the destructor will be called, and allocated memory will be freed before allowing the leave to propagate to the next level. Parameters:
  T_ptr | variable to hold return value-- pointer to new object of type T.
  auditCB | input memory management audit object
  T | data type for 'new' operation
  params | object initialization parameters
  Returns: pointer to the newly created object of type T Exceptions:
  may | leave with code = bad alloc

#define OSCL_TRAP_NEW | ( | T_ptr,
|  | T,
|  | params |  | ) | _OSCL_TRAP_NEW(_oscl_default_audit_new(sizeof(T)),_oscl_audit_free,T_ptr,T,params)

  | Oscl "new" operator. This uses the global memory audit object. This operator is similar to OSCL_NEW except that it will handle constructors that leave. If the constructor leaves, the destructor will be called, and allocated memory will be freed before allowing the leave to propagate to the next level. Parameters:
  T_ptr | variable to hold return value-- pointer to new object of type T.
  T | data type for 'new' operation
  params | object initialization parameters
  Returns: pointer to the newly created object of type T Exceptions:
  may | leave with code = bad alloc

## Typedef Documentation

typedef OSCLMemAutoPtr<MM_AllocNode, Oscl_TAlloc<MM_AllocNode, OsclMemBasicAllocator> > MM_AllocNodeAutoPtr

typedef OSCLMemAutoPtr<OsclMemStatsNode, Oscl_TAlloc<OsclMemStatsNode, OsclMemBasicAllocator> > MM_StatsNodeTagTreeType

typedef OSCLMemAutoPtr<char, Oscl_TAlloc<char, OsclMemBasicAllocator> > MMAuditCharAutoPtr

typedef OSCLMemAutoPtr<uint8, Oscl_TAlloc<uint8, _OsclBasicAllocator> > MMAuditUint8AutoPtr

typedef OSCLMemAutoPtr<OsclMemStatsNode, Oscl_TAlloc<OsclMemStatsNode, OsclMemBasicAllocator> > OsclMemStatsNodeAutoPtr

typedef Oscl_TagTree<MM_StatsNodeTagTreeType, TagTree_Allocator> OsclTagTreeType

typedef Oscl_TAlloc<MM_StatsNodeTagTreeType, OsclMemBasicAllocator> TagTree_Allocator

## Function Documentation

OSCL_IMPORT_REF void* _oscl_audit_calloc | ( | size_t | ,
|  | size_t | ,
|  | OsclAuditCB & | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_IMPORT_REF void _oscl_audit_free | ( | void * |  | ) |

OSCL_IMPORT_REF void* _oscl_audit_malloc | ( | size_t | ,
|  | OsclAuditCB & | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

| ******************************************************* Macros for malloc/free with memory management.

OSCL_IMPORT_REF void* _oscl_audit_new | ( | size_t | ,
|  | OsclAuditCB & | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_IMPORT_REF void* _oscl_audit_realloc | ( | void * | ,
|  | size_t | ,
|  | OsclAuditCB & | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_COND_IMPORT_REF void* _oscl_calloc | ( | int32 | nelems,
|  | int32 | size
| ) |

OSCL_IMPORT_REF void* _oscl_default_audit_calloc | ( | size_t | ,
|  | size_t | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_IMPORT_REF void* _oscl_default_audit_malloc | ( | size_t | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_IMPORT_REF void* _oscl_default_audit_new | ( | size_t | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_IMPORT_REF void* _oscl_default_audit_realloc | ( | void * | ,
|  | size_t | ,
|  | const char * | f = NULL,
|  | const int | l = 0
| ) |

OSCL_COND_IMPORT_REF void _oscl_free | ( | void * | src | ) |

OSCL_COND_IMPORT_REF void* _oscl_malloc | ( | int32 | count | ) |

OSCL_COND_IMPORT_REF void* _oscl_realloc | ( | void * | src,
|  | int32 | count
| ) |

void operator delete | ( | void * |  | ) | `[inline]`

void operator delete[] | ( | void * | aPtr | ) | `[inline]`

void* operator new | ( | size_t |  | ) | `[inline]`

void* operator new | ( | size_t | aSize,
|  | const char * | aFile,
|  | int | aLine
| ) | `[inline]`

void* operator new[] | ( | size_t | aSize | ) | `[inline]`

void* operator new[] | ( | size_t | aSize,
|  | const char * | aFile,
|  | int | aLine
| ) | `[inline]`

OSCL_COND_IMPORT_REF uint oscl_mem_aligned_size | ( | uint | size | ) |

  | Get memory-aligned size of an object. Parameters:
  size | size of object
Returns: memory-aligned size

OSCL_COND_IMPORT_REF int oscl_memcmp | ( | const void * | buf1,
|  | const void * | buf2,
|  | uint32 | count
| ) |

  | Compare characters in two buffers Parameters:
  buf1 | first buffer
  buf2 | second buffer
  count | number of bytes to compare
Returns: <0 buf1 less than buf2 0 buf1 equal to buf2 >0 buf1 greater than buf2

OSCL_COND_IMPORT_REF void* oscl_memcpy | ( | void * | dest,
|  | const void * | src,
|  | uint32 | count
| ) |

  | Copies characters between buffers The oscl_memcpy function copies count bytes of src to dest. If the source and destination overlap, this function does not ensure that the original source bytes in the overlapping region are copied before being overwritten. Use oscl_memmove to handle overlapping regions Parameters:
  dest | new buffer
  src | buffer to copy
  count | number of bytes to copy
Returns: the value of dest

OSCL_COND_IMPORT_REF void* oscl_memmove | ( | void * | dest,
|  | const void * | src,
|  | uint32 | count
| ) |

  | Moves chars from one buffer to another The memmove function copies count bytes of characters from src to dest. If some regions of the source area and the destination overlap, memmove ensures that the original source bytes in the overlapping region are copied before being overwritten. Parameters:
  dest | new buffer
  src | buffer to copy
  count | number of bytes to copy
Returns: the value of dest

OSCL_COND_IMPORT_REF void* oscl_memmove32 | ( | void * | dest,
|  | const void * | src,
|  | uint32 | count
| ) |

  | Same functionality as oscl_memmove, yet optimized for memory alligned on 32-bit boundary Parameters:
  dest | new buffer
  src | buffer to copy
  count | number of bytes to copy
Returns: the value of dest

OSCL_COND_IMPORT_REF void* oscl_memset | ( | void * | dest,
|  | uint8 | val,
|  | uint32 | count
| ) |

  | Sets the bytes of a buffer to a specified character Parameters:
  dest | buffer to modify
  val | character to set
  count | number of bytes to set
Returns: the value of dest

OSCL_IMPORT_REF void OsclMemInit | ( | OsclAuditCB & | auditCB | ) |

  | Initialize an OsclAuditCB object. Sets the stats node pointer to null, and sets the audit pointer to the global audit object. Parameters:
  auditCB | memory management audit object

## Variable Documentation

const uint32 MM_AllocBlockHdr::ALLOC_NODE_FLAG = 0x80000000`[static, inherited]`