📄 zpmem.h
字号:
/*
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2006-2008 Beijing, pengzhen (pengzhenxp@yahoo.com.cn) //
// //
///////////////////////////////////////////////////////////////////////////////
*/
#ifndef __ZP_MEM_H__
#define __ZP_MEM_H__
//#undef M_ALLOC
//#undef M_FREE
//#undef M_RE_ALLOC
#ifdef WIN32 /* windows */
#define M_ALLOC(a) malloc(a)
#define M_FREE(a) free(a)
#define M_RE_ALLOC(a,b) realloc(a,b)
#define restrict
//#define inline __inline
#endif /*WIN32*/
#ifdef __TCS__ /*PHILIPS*/
#if (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
void* Alloc_Buffer(int) ;
void Free_Buffer(void*) ;
void* ReAlloc_Buffer(void*,int) ;
#define M_ALLOC(a) Alloc_Buffer(a)
#define M_FREE(a) Free_Buffer(a)
#define M_RE_ALLOC(a,b) ReAlloc_Buffer(a,b)
#else /* PNX1300/TM1300 */
#define M_ALLOC(a) _cache_malloc(a,-1)
#define M_FREE(a) _cache_free(a)
#define M_RE_ALLOC(a,b) realloc(a,b)
#endif /* (TMFL_PNX_ID != 1300) */
//#define restrict
//#define __inline inline
#endif /*__TCS__*/
#ifdef __MAPCA__ /* bsp15 mapca */
#define M_ALLOC(a) memalign( 64 , (a) )
#define M_FREE(a) free(a)
//#define restrict
//#define __inline inline
#endif /*__MAPCA__*/
#if defined (_TMS320C6X) /*TI*/ /*Texas Instruments Incorporated*/
extern int extHeap;
#define M_ALLOC(a) MEM_alloc(extHeap, a, 8)
#define M_FREE(a) MEM_free(extHeap, a, -1)
//#define M_RE_ALLOC(a,b) realloc(a,b)
//#define restrict
//#define inline __inline
#endif /*_TMS320C6X*/
#endif /*__ZP_MEM_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -