SysLink API Reference  2.21.03.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
IpcMemMgr.h File Reference

Detailed Description

IPC Memory Manager.

This abstracts the IPC Memory Management interface. Supported functions include alloc, free, and copy. Additional features:

1. Process wide shared memory allocation. 2. Provides APIs to allocate kmalloc/vmalloc memory. 3. mmap/unmap. 4. translate

#include <ti/syslink/osal/OsalTypes.h>
Include dependency graph for IpcMemMgr.h:

Go to the source code of this file.

Data Structures

struct  IpcMemMgr_Config_t
 Structure defining config parameters for overall System. More...

Macros

#define IpcMemMgr_MODULEID   (0x434D)
 Unique module ID.
#define IpcMemMgr_S_NOTLAST   2
#define IpcMemMgr_S_ALREADYSETUP   1
#define IpcMemMgr_S_SUCCESS   0
#define IpcMemMgr_E_FAIL   -1
#define IpcMemMgr_E_INVALIDSTATE   -2
#define IpcMemMgr_E_INVALIDARG   -3
#define IpcMemMgr_E_MEMORY   -4
#define IpcMemMgr_E_OSFAILURE   -5
#define IpcMemMgr_E_TOOMANYNAMEDALLOCS   -6
#define IpcMemMgr_E_NOTFOUND   -7
#define IpcMemMgr_E_WRONGSIZE   -8
#define IpcMemMgr_SHAREDMEMNAME   "/syslink_shm"
#define IpcMemMgr_MAXNAMEDBUFFERS   256 /* max named buffers */
#define IpcMemMgr_MAX_NAMELEN   63 /* max name length */

Typedefs

typedef struct IpcMemMgr_Config_t IpcMemMgr_Config
 Structure defining config parameters for overall System.
typedef UInt32 IpcMemMgr_SHPtr
 SharedRegion pointer type.

Enumerations

enum  IpcMemMgr_MemType {
  IpcMemMgr_ALLOCTYPE_PSHMEM = 0x00000,
  IpcMemMgr_ALLOCTYPE_PHYS_CACHE = 0x00001,
  IpcMemMgr_ALLOCTYPE_PHYS_NOCACHE = 0x00002,
  IpcMemMgr_ALLOCTYPE_END = 0x00003
}

Functions

Void IpcMemMgr_getConfig (IpcMemMgr_Config *config)
Int IpcMemMgr_setup (IpcMemMgr_Config *cfg)
Int IpcMemMgr_destroy (Void)
Ptr IpcMemMgr_alloc (SizeT size)
Int IpcMemMgr_acquire (String name, SizeT size, Ptr *addr, Bool *newAlloc)
Void IpcMemMgr_free (Ptr adr, SizeT size)
Int IpcMemMgr_release (String name)
Ptr IpcMemMgr_getPtr (UInt32 offset)
UInt32 IpcMemMgr_getOffset (Ptr vaddr)
Ptr IpcMemMgr_allocShmemHeap (String name, UInt32 size, UInt32 align)
Int IpcMemMgr_freeShmemHeap (Ptr buf, UInt32 size)
Int IpcMemMgr_freeShmemHeapByName (String name)
IArg IpcMemMgr_enterGate (Void)
Void IpcMemMgr_leaveGate (IArg key)

Macro Definition Documentation

#define IpcMemMgr_MODULEID   (0x434D)

Unique module ID.

#define IpcMemMgr_S_NOTLAST   2
#define IpcMemMgr_S_ALREADYSETUP   1
#define IpcMemMgr_S_SUCCESS   0
#define IpcMemMgr_E_FAIL   -1
#define IpcMemMgr_E_INVALIDSTATE   -2
#define IpcMemMgr_E_INVALIDARG   -3
#define IpcMemMgr_E_MEMORY   -4
#define IpcMemMgr_E_OSFAILURE   -5
#define IpcMemMgr_E_TOOMANYNAMEDALLOCS   -6
#define IpcMemMgr_E_NOTFOUND   -7
#define IpcMemMgr_E_WRONGSIZE   -8
#define IpcMemMgr_SHAREDMEMNAME   "/syslink_shm"
#define IpcMemMgr_MAXNAMEDBUFFERS   256 /* max named buffers */
#define IpcMemMgr_MAX_NAMELEN   63 /* max name length */

Typedef Documentation

Structure defining config parameters for overall System.

SharedRegion pointer type.


Enumeration Type Documentation

Enumerator:
IpcMemMgr_ALLOCTYPE_PSHMEM 
IpcMemMgr_ALLOCTYPE_PHYS_CACHE 
IpcMemMgr_ALLOCTYPE_PHYS_NOCACHE 
IpcMemMgr_ALLOCTYPE_END 

Function Documentation

Void IpcMemMgr_getConfig ( IpcMemMgr_Config config)
Int IpcMemMgr_setup ( IpcMemMgr_Config cfg)
Int IpcMemMgr_destroy ( Void  )
Ptr IpcMemMgr_alloc ( SizeT  size)
Int IpcMemMgr_acquire ( String  name,
SizeT  size,
Ptr addr,
Bool newAlloc 
)
Void IpcMemMgr_free ( Ptr  adr,
SizeT  size 
)
Int IpcMemMgr_release ( String  name)
Ptr IpcMemMgr_getPtr ( UInt32  offset)
UInt32 IpcMemMgr_getOffset ( Ptr  vaddr)
Ptr IpcMemMgr_allocShmemHeap ( String  name,
UInt32  size,
UInt32  align 
)
Int IpcMemMgr_freeShmemHeap ( Ptr  buf,
UInt32  size 
)
Int IpcMemMgr_freeShmemHeapByName ( String  name)
IArg IpcMemMgr_enterGate ( Void  )
Void IpcMemMgr_leaveGate ( IArg  key)
Copyright 2014, Texas Instruments Incorporated