Resources | Resources |



OEM functions

In addition to IEnv, IHeap1, and the helper macros, OEMs can use OEM_Malloc(), OEM_Realloc(), and OEM_Free(). These functions replace the deprecated sys_malloc(), sys_realloc(), and sys_free() functions. For the OEM_Malloc() and OEM_Realloc() functions, memory is always tagged under the system context.

Instead of using OEM_Malloc(), which calls AEEHeap_GetGroupHeap() to find the system heap and may introduce a slight decrease in performance, developers can use IEnv on the system heap to obtain the same result.

Note: These functions are particularly suited to device drivers and objects that remain active at the system level, rather than to applications. While they are syntactically similar to MALLOC(), REALLOC(), and FREE(), they are functionally dissimilar. For example, with MALLOC() and REALLOC() the block is freed automatically when the application exits; OEM_Malloc() and OEM_Realloc() reserve blocks until explicitly freed using OEM_Free().

Required Files
Class ID(s)
Not applicable.
Interface ID
Not applicable.


This function allocates a block of memory of the requested size and returns a pointer to that memory block.

With MALLOC(), the block is automatically freed when the application exits. OEM_Malloc() reserves blocks until explicitly freed using OEM_Free().


This function reallocates a memory block and changes its size.


This function fress a block of heap memory.