12345678910111213141516171819202122 |
- #ifndef __GEL_EBOOK_MM__
- #define __GEL_EBOOK_MM__
- #if defined (CONFIG_EBOOK_USE_VIP_RESERVE_MM) && !defined(CONFIG_BLT_USE_VIP_MEMORY_FOR_BLOCK_BUFFER)
- int EBOOK_MM_Uninit(void);
- int EBOOK_MM_Init(void);
- void *EBOOK_MM_Malloc(unsigned int size);
- void EBOOK_MM_Free(void *address);
- void *EBOOK_MM_Realloc(void *ptr, unsigned int size);
- #define EBOOK_MALLOC(size) EBOOK_MM_Malloc(size)
- #define EBOOK_REALLOC(ptr, size) EBOOK_MM_Realloc(ptr, size)
- #define EBOOK_FREE(ptr) EBOOK_MM_Free(ptr)
- #else
- #define EBOOK_MALLOC(size) malloc(size)
- #define EBOOK_REALLOC(ptr, size) realloc(ptr, size)
- #define EBOOK_FREE(ptr) free(ptr)
- #endif
- #endif /* __GEL_EBOOK_MM__ */
|